php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68451 about __autoload on php 5.4.33
Submitted: 2014-11-19 15:18 UTC Modified: 2014-11-19 17:43 UTC
From: reginx at qq dot com Assigned:
Status: Not a bug Package: SPL related
PHP Version: 5.4.35 OS: win7
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: reginx at qq dot com
New email:
PHP Version: OS:

 

 [2014-11-19 15:18 UTC] reginx at qq dot com
Description:
------------
about __autoload on php 5.4.33, it's a bug?

Test script:
---------------
<?php

function __autoload ($class) {
    exit ("class " . $class . PHP_EOL);
}

// output class foo- 
// it works on php 5.3 
// but doesn't works on php 5.4
$class = 'foo-';
new $class();


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-19 17:43 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2014-11-19 17:43 UTC] requinix@php.net
As of 5.4.24 and 5.5.8, class loading was modified to first check for invalid class names before trying to call the autoloader.
http://3v4l.org/rWIFp

It's listed as "Added validation of class names in the autoload process" in the changelog.
http://php.net/ChangeLog-5.php
 [2014-11-23 05:33 UTC] reginx at qq dot com
thanks !
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 23:01:33 2025 UTC