3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = array( 'status' => (object) (array( 'code' => 0, 'message' => 'Success', )), 'result' => array( 0 => (object) (array( 'base' => (object) (array( 'id' => 3, 'created' => '2012-11-11 12:11:07', 'start' => '2012-11-11', )), 'pos' => array( 0 => (object) (array( 'id' => 4, 'invoices_id' => 3, 'article_id' => 1, 'quantity' => 1, 'unit' => 'Monate', 'pos_txt' => 'Paketname', )), ), 'summ' => (object) (array( 'net' => '2.52', 'discount' => 0, 'tax' => '0.47899159663865', 'gross' => 3, 'rounded_net' => '2.52', )), )), 1 => (object) (array( 'base' => (object) (array( 'id' => 2, 'created' => '2012-11-11 12:10:39', 'start' => '2012-11-11', )), 'pos' => array( 0 => (object) (array( 'id' => 3, 'invoices_id' => 2, 'article_id' => 2, 'quantity' => 1, 'unit' => 'Monate', 'pos_txt' => 'Paketname2', )), ), 'summ' => (object) (array( 'net' => '5.04', 'discount' => 0, 'tax' => '0.95798319327731', 'gross' => 6, 'rounded_net' => '5.04', )), )), ), ); echo "<pre>"; foreach(array_map(function($v){ return $v->pos ;}, $data['result']) as $list) { foreach($list as $objPos) echo $objPos->pos_txt,PHP_EOL; } ?>
Output for 5.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
<pre>Paketname Paketname2
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/07B2Q on line 70
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/07B2Q on line 70
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/07B2Q on line 70
Process exited with code 255.