3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $cellData = (object) ['c' => 500, 'g' => 500]; foreach ($cellData as $key => $value) { $cellData[$key] = $value * 2; } var_dump( $cellData );
based on TtqOG
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/1ZFbf:7 Stack trace: #0 {main} thrown in /in/1ZFbf on line 7
Process exited with code 255.
Output for 5.6.0 - 5.6.29
Fatal error: Cannot use object of type stdClass as array in /in/1ZFbf on line 7
Process exited with code 255.