3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "foo"; var_dump($a[7] = "abc"); $a[10]++; var_dump($a);
based on eTTk7
Output for 7.1.0
string(1) "a" Fatal error: Uncaught Error: Cannot increment/decrement string offsets in /in/bGaTR:4 Stack trace: #0 {main} thrown in /in/bGaTR on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.14
string(1) "a" Fatal error: Uncaught Error: Cannot increment/decrement overloaded objects nor string offsets in /in/bGaTR:4 Stack trace: #0 {main} thrown in /in/bGaTR on line 4
Process exited with code 255.
Output for 5.2.6 - 5.2.9, 5.2.12 - 5.6.28
string(1) "a" Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /in/bGaTR on line 4
Process exited with code 255.
Output for 5.2.10 - 5.2.11
Notice: Uninitialized string offset: 7 in /in/bGaTR on line 3 string(1) "a" Notice: Uninitialized string offset: 10 in /in/bGaTR on line 4 Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /in/bGaTR on line 4
Process exited with code 255.
Output for 4.3.3 - 5.2.5
string(3) "abc" Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /in/bGaTR on line 4
Process exited with code 255.
Output for 4.3.2
NULL Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /in/bGaTR on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
NULL Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /in/bGaTR on line 4