3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = array('foo' => 'bar'); $string = "foooooooood"; $value['foo']['bar'] .= $string;
based on vjMg0
Output for 7.1.0
Warning: Illegal string offset 'bar' in /in/2KHda on line 7 Fatal error: Uncaught Error: Cannot use assign-op operators with string offsets in /in/2KHda:7 Stack trace: #0 {main} thrown in /in/2KHda on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.14
Warning: Illegal string offset 'bar' in /in/2KHda on line 7 Fatal error: Uncaught Error: Cannot use assign-op operators with overloaded objects nor string offsets in /in/2KHda:7 Stack trace: #0 {main} thrown in /in/2KHda on line 7
Process exited with code 255.
Output for 4.3.2 - 5.3.29, hhvm-3.10.0 - 3.12.0
Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in /in/2KHda on line 7
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Warning: Illegal string offset 'bar' in /in/2KHda on line 7 Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in /in/2KHda on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in /in/2KHda on line 7