note 50160 added to function.array-map

From: Date: Sun, 20 Feb 2005 07:29:41 +0000
Subject: note 50160 added to function.array-map
Groups: php.notes 
Request: Send a blank email to php-notes+get-85264@lists.php.net to get a copy of this message
If you need to call a static method from array_map, this will NOT work: <?PHP array_map('myclass::myMethod' , $value); ?> Instead, you need to do this: <?PHP array_map( array('myclass','myMethod') , $value); ?> It is helpful to remember that this will work with any PHP function which expects a callback argument. ---- Manual Page -- http://www.php.net/manual/en/function.array-map.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50160 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50160&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50160&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50160&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50160&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50160&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50160&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85264) next »