Anonyme Funktionen in PHP 5.3

… hats bisher schon gegeben und zwar mittels create_function. Ab 5.3 wirds in PHP auch sogenannte Closures geben. Das Ganze schaut aus wie die anonymen Funktionen in JavaScript.

<?php

$closure = function ($args) use ($global) { /*Body*/ };

?>

Leave a Reply

Close
E-mail It