-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/src/php/Zend/tests/
File Upload :
Current File : //usr/src/php/Zend/tests/bug61442.phpt

--TEST--
Bug #61442 (exception threw in __autoload can not be catched)
--FILE--
<?php
function __autoload($name) {
    throw new Exception("Unable to load $name");
}

try {
    $obj = new NonLoadableClass();
} catch (Exception $e) {
    var_dump($e->getMessage());
}

try {
    $obj = NonLoadableClass::a();
} catch (Exception $e) {
    var_dump($e->getMessage());
}

try {
    $obj = NonLoadableClass::UNDEFINED_CONST;
} catch (Exception $e) {
    var_dump($e->getMessage());
}

--EXPECTF--
string(31) "Unable to load NonLoadableClass"
string(31) "Unable to load NonLoadableClass"
string(31) "Unable to load NonLoadableClass"

Copyright © 2017 || Recoded By Mr.Bumblebee