note 106780 added to function.create-function
| From: | Mino at osu1 dot php dot net | Date: | Tue, 06 Dec 2011 10:09:10 +0000 |
| Subject: | note 106780 added to function.create-function | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184926@lists.php.net to get a copy of this message | ||
Tiny note:
below is written that in PHP 5.3 you can use anonymous function like this
>> usort($MyArray,function($a,$b){return -1;});
The same could be achieved since php 4.0.1 with the following syntax ( less sexy but equally
effective):
>> usort($MyArray,create_function('$a,$b',"return -1;"));
----
Server IP: 195.221.21.36
Probable Submitter: 193.252.46.183
----
Manual Page -- http://www.php.net/manual/en/function.create-function.php
Edit -- https://master.php.net/note/edit/106780
Del: integrated -- https://master.php.net/note/delete/106780/integrated
Del: useless -- https://master.php.net/note/delete/106780/useless
Del: bad code -- https://master.php.net/note/delete/106780/bad+code
Del: spam -- https://master.php.net/note/delete/106780/spam
Del: non-english -- https://master.php.net/note/delete/106780/non-english
Del: in docs -- https://master.php.net/note/delete/106780/in+docs
Del: other reasons-- https://master.php.net/note/delete/106780
Reject -- https://master.php.net/note/reject/106780
Search -- https://master.php.net/manage/user-notes.php