Category: PHP

  • PHP Array syntax: array() vs []

    Currently there is a funny discussion going on on the php.internals mailing list (Not the first time though). It’s a debate about the syntax of the array notation. At the moment, when you want to create an array, you’d write: $myArray = array(); // To initialize it $myArray = array(‘value’, ‘foo’, ‘bar’); // Initialize, and […]

  • PHP Constants, the lesser known ones

    Often, when looking into people’s code, I find little code fragments that could be designed a bit more elegant. Sometimes the code needs refactoring or sometimes some design patterns needs to be applied. This time though, I’d like to look at some PHP constants that are lesser known, but can make your code cleaner, less […]

  • PHP Abstract podcast about Symfony

     PHPAbstract has a cool podcast up about the symfony framework. This is presented by Stefan Koopmanschap, web application developer at Ibuildings.nl. His podcast is a brief introduction to symfony, what programming principles it uses, why it can be an advantage for you to deploy your project with symfony and more. A brief and interesting introduction […]

  • Installing symfony in a subdirectory of your documentroot

    I recently needed to set up a Symfony install without a separate virtual host, so as a subdirectory of the (Apache) DocumentRoot directory (like: http://www.example.com/symfony/). As you may know, symfony appreciates it when it has a reserved virtual host for itself, but also provides ways to just install it in a separate directory. The following […]

  • PHP Statistics for December 2007

    The guys over at Nexen have their PHP statistics ready for december 2007. They give a pretty good impression on how much PHP is used on websites worldwide, and what the trends seem to be. Only one thing I found remarkable: only 27% of the servers running PHP are running PHP5! Good thing though: PHP […]

  • SPL_Types in php and strong typing

    A strong typed programming language is a programming language where the datatypes of values have restrictions on them. The restrictions apply for what datatypes can be stored in variables, whether or not you can operate on those variables and more. To have an overview of a good definition of a strong typed language, see Wikipedia. […]

  • __callStatic in PHP 5.3

    This is cool (and a feature I’ve been missing in past projects): being able to implement a __call method for static class methods. Like this: class Foo { public static function __callStatic($method, $args) { echo “Method $method has been called!” .PHP_EOL; echo “With following arguments: ” .implode(“, “, $args) .PHP_EOL; } } So you can […]

  • PHP4 End of life, finally

    Together with the last and final release of PHP 4.4.8, PHP4 is finally end of life. To quote the php.net news item: The PHP development team would like to announce the immediate availability of PHP 4.4.8. It continues to improve the security and the stability of the 4.4 branch and all users are strongly encouraged […]

  • Zend Certification practising

    I recently decided it was time to finally go for the Zend Certification Exam. Armed with the Zend 5 Certification Bundle (being the Study guide book, 10 test exams and a voucher to take the actual exam), I’m now ready to study and hopefully pass the certification. One of the things I’m glad for are […]