mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
37 lines
754 B
PHP
37 lines
754 B
PHP
--TEST--
|
|
Bug #61011 (Crash when an exception is thrown by __autoload accessing a static property)
|
|
--FILE--
|
|
<?php
|
|
spl_autoload_register(function ($name) {
|
|
throw new Exception($name);
|
|
});
|
|
|
|
try {
|
|
echo AAA::$a; //zend_fetch_var_address_helper
|
|
} catch (Exception $e) {
|
|
try {
|
|
echo AAA::XXX; //ZEND_FETCH_CONSTANT
|
|
} catch (Exception $e) {
|
|
try {
|
|
echo AAA::foo(); //ZEND_INIT_STATIC_METHOD_CALL
|
|
} catch (Exception $e) {
|
|
try {
|
|
unset(AAA::$a); // ZEND_UNSET_VAR
|
|
} catch (Exception $e){
|
|
try {
|
|
isset(AAAA::$a); // ZEND_ISSET_ISEMPTY_VAR
|
|
} catch (Exception $e) {
|
|
try {
|
|
$a = array("AAA", "foo");
|
|
$a(); //ZEND_INIT_FCALL_BY_NAME
|
|
} catch (Exception $e) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
echo 'okey';
|
|
--EXPECT--
|
|
okey
|