3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = stdClass; $bar = $foo['bar']; var_dump($bar);
Output for 5.4.20 - 7.1.0
Notice: Use of undefined constant stdClass - assumed 'stdClass' in /in/hG96K on line 3 Warning: Illegal string offset 'bar' in /in/hG96K on line 5 string(1) "s"
Output for 5.4.0 - 5.4.19
Notice: Use of undefined constant stdClass - assumed 'stdClass' in /in/AS1dh on line 3 Warning: Illegal string offset 'bar' in /in/AS1dh on line 5 string(1) "s"
Output for 4.3.0, 5.3.28 - 5.3.29
Notice: Use of undefined constant stdClass - assumed 'stdClass' in /in/hG96K on line 3 string(1) "s"
Output for 4.3.1 - 5.3.27
Notice: Use of undefined constant stdClass - assumed 'stdClass' in /in/AS1dh on line 3 string(1) "s"