xref: /PHP-8.0/Zend/tests/bug72918.phpt (revision a555cc0b)
1--TEST--
2Bug #72918 (negative offset inside a quoted string leads to parse error)
3--FILE--
4<?php
5$array = [-3 => 'foo'];
6$string = 'abcde';
7
8echo "$array[-3]\n";
9echo "$string[-3]\n";
10echo <<<EOT
11$array[-3]
12$string[-3]
13
14EOT;
15?>
16--EXPECT--
17foo
18c
19foo
20c
21