summaryrefslogtreecommitdiff
path: root/tests/lang/bug21820.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/bug21820.phpt')
-rw-r--r--tests/lang/bug21820.phpt13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lang/bug21820.phpt b/tests/lang/bug21820.phpt
new file mode 100644
index 0000000..cbf466e
--- /dev/null
+++ b/tests/lang/bug21820.phpt
@@ -0,0 +1,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