xref: /PHP-8.0/tests/lang/bug21820.phpt (revision 55a15f32)
1--TEST--
2Bug #21820 ("$arr['foo']" generates bogus E_NOTICE, should be E_PARSE)
3--FILE--
4<?php
5
6error_reporting(E_ALL);
7
8$arr = array('foo' => 'bar');
9echo "$arr['foo']";
10
11?>
12--EXPECTF--
13Parse error: %s error, %sidentifier%svariable%snumber%sin %sbug21820.php on line %d
14