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

1.1       misho       1: --TEST--
                      2: Testing instanceof operator with class and interface inheriteds
                      3: --FILE--
                      4: <?php 
                      5: 
                      6: interface ITest {
                      7: }
                      8: 
                      9: interface IFoo extends ITest {
                     10: }
                     11: 
                     12: class foo extends stdClass implements ITest {
                     13: }
                     14: 
                     15: var_dump(new foo instanceof stdClass);
                     16: var_dump(new foo instanceof ITest);
                     17: var_dump(new foo instanceof IFoo);
                     18: 
                     19: class bar extends foo implements IFoo {
                     20: }
                     21: 
                     22: var_dump(new bar instanceof stdClass);
                     23: var_dump(new bar instanceof ITest);
                     24: var_dump(new bar instanceof IFoo);
                     25: 
                     26: ?>
                     27: --EXPECT--
                     28: bool(true)
                     29: bool(true)
                     30: bool(false)
                     31: bool(true)
                     32: bool(true)
                     33: bool(true)

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