3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = [ [ ["id" => 1], ["id" => 3], ["id" => 8] ], [ ["id" => 1] ], [ ["id" => 3], ["id" => 2] ] ]; $unique_ids = array_column(array_merge(...$values), "id", "id"); sort($unique_ids); var_export($unique_ids); echo "\n\n"; foreach ($values as $groups) { foreach ($groups as $rows) { $result[$rows["id"]] = $rows["id"]; } } sort($result); var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 1, 1 => 2, 2 => 3, 3 => 8, ) array ( 0 => 1, 1 => 2, 2 => 3, 3 => 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:
133.1 ms | 405 KiB | 5 Q