note 78984 deleted from function.usort by crell

From: Date: Thu, 31 Mar 2022 16:31:42 +0000
Subject: note 78984 deleted from function.usort by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-217832@lists.php.net to get a copy of this message
Note Submitter: Sid_M ---- 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.

« previous php.notes (#217832) next »