Revise callback Psuedo-type to support new Closure class ?

From: Date: Wed, 24 Nov 2010 18:00:23 +0000
Subject: Revise callback Psuedo-type to support new Closure class ?
Groups: php.internals 
Request: Send a blank email to internals+get-50476@lists.php.net to get a copy of this message
Hi all, I had a thought this morning and would like some feedback. Don't you think it would make sense to allow the callback psuedo-type to also allow the new Closure class to be an acceptable data type? A simple example that would be nice to have working would be <?php $fClosure = function($val, $key) { echo "$key => $val" . PHP_EOL; } $aNumbers = array(5, 4, 3, 2, 1); array_walk($aNumbers, $fClosure); ?> Thoughts ? -nathan

« previous php.internals (#50476) next »