3v4l.org

run code in 300+ PHP versions simultaneously
<?php $names = ['TestAgent1', 'TestAgent', 'TestAgent1', 'TestAgent1', 'TestAgent2', 'TestAgent2', 'TestAgent2']; $values = ['2019-01', '2019-04', '2019-05', '2019-06', '2019-04', '2019-05', '2019-06']; $unique = array_unique($names); foreach($unique as $name){ $res[] = array_merge([$name], array_intersect_key($values, array_intersect($names, [$name]))); } print_r($res);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => TestAgent1 [1] => 2019-01 [2] => 2019-05 [3] => 2019-06 ) [1] => Array ( [0] => TestAgent [1] => 2019-04 ) [2] => Array ( [0] => TestAgent2 [1] => 2019-04 [2] => 2019-05 [3] => 2019-06 ) )

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:
173.75 ms | 406 KiB | 5 Q