3v4l.org

run code in 300+ PHP versions simultaneously
<?php parse_str('a[1]=foo&a[100]=bar'); var_dump($a);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
Fatal error: Uncaught ArgumentCountError: parse_str() expects exactly 2 arguments, 1 given in /in/k30eb:3 Stack trace: #0 /in/k30eb(3): parse_str('a[1]=foo&a[100]...') #1 {main} thrown in /in/k30eb on line 3
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Deprecated: parse_str(): Calling parse_str() without the result argument is deprecated in /in/k30eb on line 3 array(2) { [1]=> string(3) "foo" [100]=> string(3) "bar" }
Output for 5.5.0 - 5.5.35, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.3.32 - 7.3.33
array(2) { [1]=> string(3) "foo" [100]=> string(3) "bar" }

preferences:
163.18 ms | 409 KiB | 5 Q