3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar = []; $ar[0]['name'] = 'Ted'; $ar[1]['name'] = 'Red'; $ar[2]['name'] = 'Ted'; $res_ar = []; $ar_names = []; foreach($ar as $ind => $row){ if (in_array($row['name'],$ar_names)){ array_splice($ar,$ind,1); } else { $ar_names[] = $row['name']; $res_ar[] = $row; } } print_r($res_ar);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [name] => Ted ) [1] => Array ( [name] => Red ) )

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:
121.94 ms | 405 KiB | 5 Q