summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72918.phpt
blob: 92ee518de597aaf88d0f3399706e5cb7a9723a61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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;
?>
--EXPECT--
foo
c
foo
c