ID: 42994
Comment by: crrodriguez at suse dot de
Reported By: arnout at argeweb dot nl
Status: Open
Bug Type: Unknown/Other Function
Operating System: BSD
PHP Version: 5.2.4
New Comment:
Your exact code works just fine here, it does not call __autoload at
all... what is your exact PHP version ?
Previous Comments:
------------------------------------------------------------------------
[2007-10-16 15:22:20] arnout at argeweb dot nl
Description:
------------
When using is_callable on non-existing static class functions
__autoload will be called twice with some encoded (and thus
non-existent) classname.
Reproduce code:
---------------
autoload.php
<?php
class test{
function notest(){
}
}
function __autoload( $classname ){
echo "let's require $classname!<br/>\n";
}
if( is_callable( array( 'test', 'test' ) ) ){
echo "test::test exists.";
}else{
echo "test::test doesn't exist.";
}
?>
Expected result:
----------------
test::test doesn't exist.
(no __autoload execution at all)
Actual result:
--------------
let's require 9akf!
let's require 9akf!
test::test doesn't exist.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42994&edit=1