3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = ['a' => 'a', 'b' => 'b', 'c' => 'c']; $o = new SdtClass(); foreach ($a as $idx => $value) { echo $o->{$idx} . PHP_EOL; }
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'SdtClass' not found in /in/8mEM5:3 Stack trace: #0 {main} thrown in /in/8mEM5 on line 3
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Class 'SdtClass' not found in /in/8mEM5 on line 3
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/8mEM5 on line 2
Process exited with code 255.