php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45364 usort does not auto-load classes
Submitted: 2008-06-26 12:10 UTC Modified: 2014-11-02 01:26 UTC
Votes:4
Avg. Score:4.2 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: lindsay at marshall dot name Assigned: requinix (profile)
Status: Closed Package: *General Issues
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lindsay at marshall dot name
New email:
PHP Version: OS:

 

 [2008-06-26 12:10 UTC] lindsay at marshall dot name
Description:
------------
On a call :

        usort($array, array('Class', 'func'));

If Class is not loaded when usort is called it does not trigger the auto-loader.

Expected result:
----------------
The class is auto-loaded as necessary

Actual result:
--------------
The class is not loaded and the script fails

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-02 01:26 UTC] requinix@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: requinix
 [2014-11-02 01:26 UTC] requinix@php.net
Don't have 5.2 around to double-check with but this certainly does work now.
http://3v4l.org/LrLKV
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 09:01:31 2025 UTC