Category Archives: PHP

Php tutorials

Javascript style object literals in PHP

By | July 21, 2012

Javascript object literals look like this As similar thing can be done in PHP using anonymous functions (since 5.3) Quick example Looks interesting ? Ofcourse! Since version 5.3 Php added support for closures and that feature has been used above to create javascript style object literals. The use(&$a) expression makes the variable $a available inside… Read More »