2007-03-08 20:59:31 +00:00
|
|
|
--TEST--
|
2020-07-29 01:51:09 +00:00
|
|
|
Crash on $x['2x']['y'] += 1 when $x is string
|
2007-03-08 20:59:31 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$x = "a";
|
2020-07-29 01:51:09 +00:00
|
|
|
$x['2x']['y'] += 1;
|
2007-03-08 20:59:31 +00:00
|
|
|
|
|
|
|
echo "Done\n";
|
|
|
|
?>
|
2018-09-16 17:16:42 +00:00
|
|
|
--EXPECTF--
|
2020-07-29 01:51:09 +00:00
|
|
|
Warning: Illegal string offset "2x" in %s on line %d
|
2011-12-19 02:05:03 +00:00
|
|
|
|
2015-05-17 22:31:43 +00:00
|
|
|
Fatal error: Uncaught Error: Cannot use string offset as an array in %soffset_assign.php:%d
|
2015-05-15 19:04:07 +00:00
|
|
|
Stack trace:
|
|
|
|
#0 {main}
|
|
|
|
thrown in %soffset_assign.php on line %d
|