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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC