Mantis - Quercus
Viewing Issue Advanced Details
5233 minor always 10-03-12 21:22 11-30-12 08:11
nagaseyasuhito  
 
normal  
new 4.0.31  
open  
none    
none  
0005233: is_callable method is different behavior from PHP5.x
I found a bug of is_callable method behavior.

see Additional Information.

thanks.
$ php -v
PHP 5.3.3 (cli) (built: Jul 3 2012 16:53:21)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
$ cat test.php
<?php
class Test {
        protected static function protected_static_method() {
        }

        public static function caller() {
                var_dump(is_callable(array("Test", "protected_static_method")));
        }

}

var_dump(is_callable(array("Test", "protected_static_method")));
Test::caller();
$ java -cp resin.jar com.caucho.quercus.CliQuercus test.php
bool(false)
bool(false)
$ php test.php
bool(false)
bool(true)

Notes
(0006099)
nam   
11-30-12 08:11   
Hi nagaseyasuhito,

Currently, is_callable() does not work properly for protected/private methods. This is a known problem and I do not have a timeframe for when it will be fixed. Sorry.