summaryrefslogtreecommitdiff
path: root/tests/lang/bug21820.phpt
blob: cbf466eea7fc2e2d7ebff3bd079430e1d93744e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
Bug #21820 ("$arr['foo']" generates bogus E_NOTICE, should be E_PARSE)
--FILE--
<?php

error_reporting(E_ALL);

$arr = array('foo' => 'bar');
echo "$arr['foo']";

?>
--EXPECTF--
Parse error: %s error, %s(T_STRING)%s(T_VARIABLE)%s(T_NUM_STRING)%sin %sbug21820.php on line %d