3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [ (object) ['id' => 1, 'name' => 'hovno'], (object) ['id' => 2, 'name' => 'piča'], ]; array_walk($array, function($item) { return $item->id; }); echo implode(',', $array);
based on 8S1qD
Output for 7.1.0 - 7.2.0
Recoverable fatal error: Object of class stdClass could not be converted to string in /in/CY41O on line 11
Process exited with code 255.
Output for 5.4.10 - 7.0.20
Catchable fatal error: Object of class stdClass could not be converted to string in /in/CY41O on line 11
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/CY41O on line 3
Process exited with code 255.