Bug #1226: usort, uksort... cmp_function scope
| From: | ping at alter dot it | Date: | Thu, 11 Mar 1999 22:44:25 +0000 |
| Subject: | Bug #1226: usort, uksort... cmp_function scope | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4579@lists.php.net to get a copy of this message | ||
From: ping@alter.it
Operating system: Linux
PHP version: 3.0.5
PHP Bug Type: Misbehaving function
Bug description: usort, uksort... cmp_function scope
if i use usort, uksort etc within a class method, i cannot
specify the cmp_function as another class method. PHP seems to ignore it, and no sort is done. No
error message whatsoever.
the cmp_function has to be present as a function in the calling script.
This prevents me from relegating the sort logic to a well uniquely defined method, and obliges to
have a function by that exact name whenewer I want to call that class method.
In practice sorting arrays from within classes is unusable
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net