mirror of
https://github.com/php/php-src.git
synced 2024-12-22 00:10:16 +08:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
38 lines
717 B
PHP
38 lines
717 B
PHP
--TEST--
|
|
Bug #70089 (segfault in PHP 7 at ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER ())
|
|
--INI--
|
|
opcache.enable=0
|
|
--FILE--
|
|
<?php
|
|
function dummy($a) {
|
|
}
|
|
|
|
try {
|
|
chr(0)[0][] = 1;
|
|
} catch (Error $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
try {
|
|
unset(chr(0)[0][0]);
|
|
} catch (Error $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
eval("function runtimetest(&\$a) {} ");
|
|
try {
|
|
runtimetest(chr(0)[0]);
|
|
} catch (Error $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
|
|
try {
|
|
++chr(0)[0];
|
|
} catch (Error $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(36) "Cannot use string offset as an array"
|
|
string(27) "Cannot unset string offsets"
|
|
string(41) "Only variables can be passed by reference"
|
|
string(41) "Cannot increment/decrement string offsets"
|