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.

Download it!

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>

Benchmarks - Yii, CodeIgniter, Phraw

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

Latest news of 2012-01-11

  • Phraw 0.4 release candidate

    The Phraw 0.4 release candidate is out.

    WHAT'S NEW:

    • 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
    • Full documentation
    • Unit tests

    Help is welcome. Please, spend some minutes to check this new version.

    Download it here.

Subscribe to the feed RSS/Atom See the archive of news.