3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $o = new StdClass(); $o->foo = 'bar'; var_dump($o); unset($o['foo']); var_dump($o);
Output for 7.0.0 - 7.1.0
object(stdClass)#1 (1) { ["foo"]=> string(3) "bar" } Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/a4cT6:5 Stack trace: #0 {main} thrown in /in/a4cT6 on line 5
Process exited with code 255.
Output for 5.0.0 - 5.6.28
object(stdClass)#1 (1) { ["foo"]=> string(3) "bar" } Fatal error: Cannot use object of type stdClass as array in /in/a4cT6 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.4.9
object(stdClass)(1) { ["foo"]=> string(3) "bar" } object(stdClass)(0) { }