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, null, 'tabelle_mannschaft'); foreach ($array as &$row) { $row = $lookup[$row['tabelle_mannschaft']] ?? array_shift($subset); } var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'tabelle_mannschaft' => 'TSV HORIZONT', ), 1 => array ( 'tabelle_mannschaft' => 'Mannschaft 7', ), 2 => array ( 'tabelle_mannschaft' => 'TSV HORIZONT', ), 3 => array ( 'tabelle_mannschaft' => 'Mannschaft 7', ), )

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:
53.04 ms | 1301 KiB | 4 Q