note 78984 added to function.usort
| From: | Sid_M at osu1 dot php dot net | Date: | Tue, 06 Nov 2007 01:54:31 +0000 |
| Subject: | note 78984 added to function.usort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132024@lists.php.net to get a copy of this message | ||
The sample function for having the sort function be a class method has a comment identifying the
sorting function as static, however the function does not have the static keyword. In PHP 5 (at
least as configured on my server), usort will fail, identifying the method as non-static. Preceding
the function keyword with the static keyword fixed the problem.
----
Server IP: 69.147.83.197
Probable Submitter: 76.167.91.51
----
Manual Page -- http://www.php.net/manual/en/function.usort.php
Edit -- https://master.php.net/note/edit/78984
Del: integrated -- https://master.php.net/note/delete/78984/integrated
Del: useless -- https://master.php.net/note/delete/78984/useless
Del: bad code -- https://master.php.net/note/delete/78984/bad+code
Del: spam -- https://master.php.net/note/delete/78984/spam
Del: non-english -- https://master.php.net/note/delete/78984/non-english
Del: in docs -- https://master.php.net/note/delete/78984/in+docs
Del: other reasons-- https://master.php.net/note/delete/78984
Reject -- https://master.php.net/note/reject/78984
Search -- https://master.php.net/manage/user-notes.php