php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42798 __autoload() not triggered for classes used in method signature
Submitted: 2007-09-29 14:36 UTC Modified: 2007-10-01 09:33 UTC
From: sebastian@php.net Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3CVS-2007-09-29 (CVS) 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: sebastian@php.net
New email:
PHP Version: OS:

 

 [2007-09-29 14:36 UTC] sebastian@php.net
Description:
------------
In the PHP_5_3 branch, the __autoload() function is not triggered for classes that are used in method signatures.

Reproduce code:
---------------
<?php
function __autoload($className)
{
    print '*';
}

class a
{
    public static function b($c = d::constant)
    {
    }
}

a::b();

Expected result:
----------------
sb@vmware ~ % /usr/local/php-5.2/bin/php -n test.php
*
Fatal error: Class 'd' not found in /home/sb/test.php on line 9

Actual result:
--------------
sb@vmware ~ % /usr/local/php-5.3/bin/php -n test.php

Fatal error: Class 'd' not found in /home/sb/test.php on line 9

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-30 12:58 UTC] johannes@php.net
Dmitry, can you take a look, please.
 [2007-10-01 09:33 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC