Example #2 is_callable() and constructors As of PHP 5.3.0 is_callable() reports constructors as not being callable. This affects PHP 5 style constructors (__construct) as well as PHP 4 stlye constructors (i.e. methods with the same name as the class). Formerly, both cases have been considered callable.
<?php class Foo{ public function __construct() {} public function foo() {} } var_dump( is_callable(array('Foo', '__construct')), is_callable(array('Foo', 'foo')) );
上边这段代码将会输出: The above example will output: bool(false) bool(false)