3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getQueryVariables($queryString) { $vars = explode('&', $queryString); $pairs = []; for ($i = 0; $i < count($vars); $i++) { $element = explode('=', $vars[$i]); $pairs[] = [$element[0] => $element[1]]; } return $pairs; } // $query = $_SERVER['QUERY_STRING']; $query = 'abc=qwer&abc=1234'; var_dump(getQueryVariables($query));
Output for git.master_jit, git.master, rfc.property-hooks
array(2) { [0]=> array(1) { ["abc"]=> string(4) "qwer" } [1]=> array(1) { ["abc"]=> string(4) "1234" } }

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