Annotation of embedaddon/php/Zend/tests/bug49908.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #49908 (throwing exception in __autoload crashes when interface is not defined)
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: function __autoload($className) {
        !             7:        var_dump($className);
        !             8:        
        !             9:        if ($className == 'Foo') {
        !            10:                class Foo implements Bar {};
        !            11:        } else {
        !            12:                throw new Exception($className);
        !            13:        }
        !            14: }
        !            15: 
        !            16: new Foo;
        !            17: 
        !            18: ?>
        !            19: --EXPECTF--
        !            20: %unicode|string%(3) "Foo"
        !            21: %unicode|string%(3) "Bar"
        !            22: 
        !            23: Fatal error: Uncaught exception 'Exception' with message 'Bar' in %s:%d
        !            24: Stack trace:
        !            25: #0 %s(7): __autoload('Bar')
        !            26: #1 %s(13): __autoload('Foo')
        !            27: #2 {main}
        !            28:   thrown in %s on line %d

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