3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "title=ACADEMY&amp;category=&amp;length_comparison=gt&amp;length=50"; parse_str($str); echo $title; // value echo $arr[0]."<br />"; // foo bar echo $arr[1]."<br />"; // baz parse_str($str, $output); echo $output['title']; // value echo $output['arr'][0]."<br />"; // foo bar echo $output['arr'][1]."<br />"; // baz
Output for 5.3.0 - 5.4.44, 5.5.24 - 7.1.0
ACADEMY Notice: Undefined variable: arr in /in/kKoY2 on line 6 <br /> Notice: Undefined variable: arr in /in/kKoY2 on line 7 <br />ACADEMY Notice: Undefined index: arr in /in/kKoY2 on line 11 <br /> Notice: Undefined index: arr in /in/kKoY2 on line 12 <br />
Output for 5.4.45
ACADEMY<br /><br />ACADEMY<br /><br />
Output for 5.0.4 - 5.2.17
ACADEMY Notice: Undefined variable: arr in /in/kKoY2 on line 6 <br /> Notice: Undefined variable: arr in /in/kKoY2 on line 7 <br />ACADEMY Notice: Undefined index: arr in /in/kKoY2 on line 11 <br /> Notice: Undefined index: arr in /in/kKoY2 on line 12 <br />
Output for 4.3.0 - 5.0.3
ACADEMY Notice: Undefined variable: arr in /in/kKoY2 on line 6 <br /> Notice: Undefined variable: arr in /in/kKoY2 on line 7 <br />ACADEMY Notice: Undefined index: arr in /in/kKoY2 on line 11 <br /> Notice: Undefined index: arr in /in/kKoY2 on line 12 <br />