summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72918.phpt
blob: 403d4e69c501c1e915e2e86d79b677becf6b875d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Bug #72918 (negative offset inside a quoted string leads to parse error)
--FILE--
<?php
$array = [-3 => 'foo'];
$string = 'abcde';

echo "$array[-3]\n";
echo "$string[-3]\n";
echo <<<EOT
$array[-3]
$string[-3]

EOT;
?>
===DONE===
--EXPECT--
foo
c
foo
c
===DONE===