background preloader

PHP 5.3

Facebook Twitter

PHP 5.3: Lambda Funktionen - PHP - Tutorials, Tipps und Tricks f. Bisher ist es in PHP nur möglich anonyme Funktionen über die Funktion create_function() zu erstellen. Definition einer funktion mit create_function() Hierbei wird die eigentliche Funktion erst beim Aufruf erstellt. Wird also $anonym(2, 5) mehrfach hintereinander aufgerufen, so wird die Funktion auch jedes mal neu erstellt. Darüber hinaus hat diese Variante den Nachteil, dass IDEs den Inhalt (2. Upcoming features in PHP 5.3 - 't Bijstere spoor. PHP 5.3 alpha1 just got released yesterday, and I thought this might be a good time to list some of the new things that are coming, and how it could benefit you.

Upcoming features in PHP 5.3 - 't Bijstere spoor

Even though its a minor release, a lot of new features made it in and from a marketing standpoint it should have really been 6.0, if you'd ask me. Namespaces A subject touched and trialed many times in PHP, namespaces. This feature has been responsible for the longest discussions on PHP-DEV, but finally a consensus has arrived on how this is going to work.

The biggest benefit namespaces will provide is shortening of long classnames. Rfc:closures [PHP Wiki] Closures in PHP 5.3.