Annotation of embedaddon/php/Zend/tests/bug63111.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #63111 (is_callable() lies for abstract static method)
                      3: --FILE--
                      4: <?php
                      5: abstract class Foo {
                      6:         abstract static function bar();
                      7: }
                      8: interface MyInterface {
                      9:     static function bar();
                     10: }
                     11: abstract class Bar {
                     12:        static function foo() {
                     13:                echo "ok\n";
                     14:        }
                     15: }
                     16: var_dump(is_callable(array("Foo", "bar")));
                     17: var_dump(is_callable("Foo::bar"));
                     18: var_dump(is_callable(array("MyInterface", "bar")));
                     19: var_dump(is_callable("MyInterface::bar"));
                     20: var_dump(is_callable(array("Bar", "foo")));
                     21: var_dump(is_callable("Bar::foo"));
                     22: Bar::foo();
                     23: Foo::bar();
                     24: ?>
                     25: --EXPECTF--
                     26: Strict Standards: Static function Foo::bar() should not be abstract in %sbug63111.php on line 3
                     27: bool(false)
                     28: bool(false)
                     29: bool(false)
                     30: bool(false)
                     31: bool(true)
                     32: bool(true)
                     33: ok
                     34: 
                     35: Fatal error: Cannot call abstract method Foo::bar() in %sbug63111.php on line 20
                     36: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>