3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // the entire array $array = Array ( [0] => 'stdClass Object' ( ['job_id'] => 77, 'signers_id' => 2, 's_last_name' => 'Tesarski', 's_first_name' => 'Karolina', 'fk_comp_id' => 2, 'comp_name' => 'Qart' ), 1 => stdClass Object ( 'job_id' => 83, 'signers_id' => 1, 's_last_name' => 'McLeary', 's_first_name' => 'Eon', 'fk_comp_id' => 3, 'comp_name' => 'REI' ), 2 => stdClass Object ( 'job_id' => 83, 'signers_id' => 4, 's_last_name' => 'McLeary', 's_first_name' => 'James', 'fk_comp_id' => 3, 'comp_name' => 'REI' ), 3 => stdClass Object ( 'job_id' => 84, 'signers_id' => 3, 's_last_name' => 'Hally', 's_first_name' => 'Marvin', 'fk_comp_id' => 4, 'comp_name' => 'Starbucks' ) ); foreach($array as $row){ //echos job_id //echo $arr0['job_id'] . "\n"; $group[] = $row->job_id; //$key_list = $key; } echo implode("\n", $group);
based on aLHKp
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' in /in/3ZWSe on line 7
Process exited with code 255.
Output for 5.4.11 - 5.6.16
Parse error: syntax error, unexpected '(', expecting ')' in /in/3ZWSe on line 6
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/3ZWSe on line 5
Process exited with code 255.