3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ ['tabelle_mannschaft' => 'SV Winter'], ['tabelle_mannschaft' => 'Mannschaft 7'], ['tabelle_mannschaft' => 'TSV HORIZONT'], ['tabelle_mannschaft' => 'Mannschaft 8'], ]; $subset = [ ['tabelle_mannschaft' => 'TSV HORIZONT'], ['tabelle_mannschaft' => 'Mannschaft 7'], ]; $lookup = array_column($subset, 'tabelle_mannschaft', 'tabelle_mannschaft'); foreach ($array as $i => $row) { if (isset($lookup[$row['tabelle_mannschaft']])) { $array[$i] = array_shift($subset); } } var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'tabelle_mannschaft' => 'SV Winter', ), 1 => array ( 'tabelle_mannschaft' => 'TSV HORIZONT', ), 2 => array ( 'tabelle_mannschaft' => 'Mannschaft 7', ), 3 => array ( 'tabelle_mannschaft' => 'Mannschaft 8', ), )

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:
48.83 ms | 1300 KiB | 4 Q