3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $requestedUri = $_SERVER['REQUEST_URI'] = 'http://www.testing.com/login'; $requestedUriWithQuery = $_SERVER['REQUEST_URI'] = 'http://www.testing.com/login?name=name&password=password'; print_r( parse_url($requestedUri), parse_url($requestedUriWithQuery), parse_str($requestedUriWithQuery["query"]) );
based on lYh7e
Output for 7.2.0
Warning: Illegal string offset 'query' in /in/WYuO2 on line 7 Deprecated: parse_str(): Calling parse_str() without the result argument is deprecated in /in/WYuO2 on line 7 Warning: print_r() expects at most 2 parameters, 3 given in /in/WYuO2 on line 7
Output for 7.0.0 - 7.1.10
Warning: Illegal string offset 'query' in /in/WYuO2 on line 7 Warning: print_r() expects at most 2 parameters, 3 given in /in/WYuO2 on line 7
Output for 5.4.11 - 5.6.28
Warning: Illegal string offset 'query' in /in/WYuO2 on line 7 Warning: print_r() expects at most 2 parameters, 3 given in /in/WYuO2 on line 8
Output for 5.3.21 - 5.3.29
Warning: print_r() expects at most 2 parameters, 3 given in /in/WYuO2 on line 8