3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parse_qs($data) { $data = preg_replace_callback('/(?:^|(?<=&))[^=[]+/', function($match) { return bin2hex(urldecode($match[0])); }, $data); parse_str($data, $values); return array_combine(array_map('hex2bin', array_keys($values)), $values); } $query = "foo\0bar=baz"; var_dump(parse_qs($query));
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { ["foobar"]=> string(3) "baz" }

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