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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
32 - 2 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 18:01:34 2024 UTC