note 91871 added to functions.anonymous
| From: | mcm dot matt at gmail dot com | Date: | Tue, 30 Jun 2009 12:49:05 +0000 |
| Subject: | note 91871 added to functions.anonymous | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-157691@lists.php.net to get a copy of this message | ||
Example using uasort.
<?php
// Usual method.
function cmp($a, $b) {
return($a > $b);
}
uasort($array, 'cmp');
// New
uasort($array, function($a, $b) {
return($a > $b);
});
?>
----
Server IP: 92.48.74.199
Probable Submitter: 81.152.45.107
----
Manual Page -- http://www.php.net/manual/en/functions.anonymous.php
Edit -- https://master.php.net/note/edit/91871
Del: integrated -- https://master.php.net/note/delete/91871/integrated
Del: useless -- https://master.php.net/note/delete/91871/useless
Del: bad code -- https://master.php.net/note/delete/91871/bad+code
Del: spam -- https://master.php.net/note/delete/91871/spam
Del: non-english -- https://master.php.net/note/delete/91871/non-english
Del: in docs -- https://master.php.net/note/delete/91871/in+docs
Del: other reasons-- https://master.php.net/note/delete/91871
Reject -- https://master.php.net/note/reject/91871
Search -- https://master.php.net/manage/user-notes.php