Phraw PHP micro framework
Phraw is a mini-framework for web sites and web applications. It's open source, fast, flexible and has a very small footprint.
Latest news of 2012-01-11 // Phraw 0.4 release candidate
A benchmark under a quad core, 2GB RAM, Kubuntu 10.04, PHP 5.3. The pages tested are the static wellcome pages of Yii and CodeIgniter without the use of databases. The Phraw test page is the home page of the example included in the package.
$ siege -c30 -b -t30S <url>
Yii 1.1.6 | CodeIgniter 2.0.2 | Phraw 0.3 + Smarty | Phraw 0.3 + RainTPL |
132.98 trans/sec | 388.74 trans/sec | 485.65 trans/sec | 1528.01 trans/sec |
The smallest example
<?php
require_once('phraw/phraw.php');
$phraw = new Phraw();
if ($phraw->route('')) {
echo 'Hello world!';
}
?>
See the little gallery of small examples.
Features and Benefits
- Very small and lighweight core - only 6.9 KB (130 lines of code)!
- Flexible - you have the full control of the application
- Very fast to learn - documented code and examples (more guides and recipes will be published soon)
- It leverages Smarty, the best template engine for PHP (...and you can change it if you want)
- Flexible urls - great for SEO!
- Template caching - with Smarty
- MVCP pattern - Model View Control Presenter, but also MVC or VCP and VC!
- Redirects
- Detection and correction of the trailing slash - useful for SEO
- Client error headers
- Success headers
- Bulk route - a flexible way to route a lot of similar pages in one shot
In the next release:
- Rain TPL template engine - very fast but also very simple
- Session handling - customizable and replaceable
- 3 routing methods: equal comparison, regular expression, regular expresion in parenthesis (simpler)
- Custom routing
- Tree route - a flexible way to route through a hierarchy of pages in one shot
Read more
- Quick Start Guide
- FAQ
- Forum - Ask for help, development discussions etc.
- How to help - Even if you are not a developer, you can help the project too!
Latest news of 2012-01-11