3v4l.org

run code in 300+ PHP versions simultaneously
<?php $all = array( array( 'titulo' => 'Nome 1', 'itens' => array( 'item1', 'item2', 'item3') ), array( 'titulo' => 'Nome 2', 'itens' => array( 'item4', 'item5', 'item6') ), array( 'titulo' => 'Nome 4', 'itens' => array( 'item7', 'item8', 'item9') )); $result = []; foreach ($all as $row) { array_push($result, ...$row['itens']); } var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'item1', 1 => 'item2', 2 => 'item3', 3 => 'item4', 4 => 'item5', 5 => 'item6', 6 => 'item7', 7 => 'item8', 8 => 'item9', )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
28.43 ms | 405 KiB | 5 Q