3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'count' => 1, [ 'name' => ['count' => 1, 'mac'], 'name', 'staffid' => ['count' => 1, '1234'], 'staffid', 'school' => ['count' => 1, 'western'], 'school', 'count' => 3, 'dn' => 'cn=mac,cn=staff', ], ]; $result = []; foreach ($array[0] as $k => $v) { if (is_int($k)) { $result[$v] = $array[0][$v][0]; } } var_export($result);
Output for git.master, git.master_jit
array ( 'name' => 'mac', 'staffid' => '1234', 'school' => 'western', )

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