3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filter = '/projects/filter/2706/seg/546/item-type/1:2/task/4467/item-type/2:1/type/or/page/1'; $params = explode('/', $filter); $params = array_slice($params, 4); $i = 0; $retval = array(); $lastval = ''; foreach($params as $param) { if ($i % 2) { $retval[$lastval] = $param; } else { $retval[$param] = FALSE; $lastval = $param; } $i++; } var_dump($retval);
Output for git.master, git.master_jit, rfc.property-hooks
array(5) { ["seg"]=> string(3) "546" ["item-type"]=> string(3) "2:1" ["task"]=> string(4) "4467" ["type"]=> string(2) "or" ["page"]=> string(1) "1" }

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:
40.64 ms | 401 KiB | 8 Q