Edit report at http://bugs.php.net/bug.php?id=53920&edit=1
ID: 53920 Updated by: ahar...@php.net Reported by: rubs33 at gmail dot com Summary: is_callable is invoking autoloading incorrectly -Status: Open +Status: Wont fix Type: Bug Package: Scripting Engine problem Operating System: Linux PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: I don't think there's any real value in trying to make is_callable() smarter in this case. Garbage in, garbage out. Previous Comments: ------------------------------------------------------------------------ [2011-02-03 19:56:02] rubs33 at gmail dot com Description: ------------ When you set a string variable with a value like "return any_class::any_method();" and use it on "is_callable" PHP core function, the autoloading is invoked trying to load a class named "return any_class". Test script: --------------- <?php function __autoload($class) { printf("Required class: '%s'\n", $class); } $code = 'return foo::bar();'; var_dump(is_callable($code)); Expected result: ---------------- bool(false) Actual result: -------------- Required class: 'return foo' bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53920&edit=1