xref: /PHP-7.1/Zend/tests/bug72918.phpt (revision 3f72c77c)
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===DONE===
17--EXPECT--
18foo
19c
20foo
21c
22===DONE===
23