summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70089.phpt
blob: e1884d9dac43183de064e18517846082bf222f95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--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());
}
?>
--EXPECTF--
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"