Use of create_function()

From: Date: Sun, 04 Jun 2000 22:49:55 +0000
Subject: Use of create_function()
Groups: php.dev 
Request: Send a blank email to php-dev+get-20208@lists.php.net to get a copy of this message
Per Andrei's request, a simple example: <?php $a = array(3,2,1); usort($a, create_function('$a,$b', 'return $a-$b;')); var_dump($a); ?> As you can tell, the first argument denotes the argument list the function expects to receive, whereas the second argument is the function statement. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.dev (#20208) next »