xref: /php-src/Zend/tests/offset_assign.phpt (revision b2248789)
1--TEST--
2Crash on $x['2x']['y'] += 1 when $x is string
3--FILE--
4<?php
5$x = "a";
6$x['2x']['y'] += 1;
7
8echo "Done\n";
9?>
10--EXPECTF--
11Warning: Illegal string offset "2x" in %s on line %d
12
13Fatal error: Uncaught Error: Cannot use string offset as an array in %soffset_assign.php:%d
14Stack trace:
15#0 {main}
16  thrown in %soffset_assign.php on line %d
17