3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "first=value&arr[]=foo+bar&arr[]=baz"; parse_str($str); echo $first; // value echo $arr[0]."<br />"; // foo bar echo $arr[1]."<br />"; // baz parse_str($str, $output); echo $output['first']; // value echo $output['arr'][0]."<br />"; // foo bar echo $output['arr'][1]."<br />"; // baz

preferences:
32.76 ms | 402 KiB | 5 Q