3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = "hello"; $foo[0] = $foo[0] + 1; var_dump($foo); $foo[0]++; var_dump($foo); ?>
Output for 7.1.0 - 7.1.7
Warning: A non-numeric value encountered in /in/mqvhe on line 4 string(5) "1ello" Fatal error: Uncaught Error: Cannot increment/decrement string offsets in /in/mqvhe:7 Stack trace: #0 {main} thrown in /in/mqvhe on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.20
string(5) "1ello" Fatal error: Uncaught Error: Cannot increment/decrement overloaded objects nor string offsets in /in/mqvhe:7 Stack trace: #0 {main} thrown in /in/mqvhe on line 7
Process exited with code 255.
Output for 4.3.2 - 5.6.28
string(5) "1ello" Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /in/mqvhe on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
string(5) "1ello" Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /in/mqvhe on line 7