3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $links = array( "product.php?shopprodid=62&variantid=152" ); foreach ($links as $url){ $parsed_url = parse_url($url); $query = isset($parsed_url['query']) ? $parsed_url['query'] : ''; $parts = parse_str($query); var_dump($parts); //foreach ( as $param){ // var_dump(parse_str($query)); //} }
based on KPouX
Output for 7.2.0 - 7.2.6
Deprecated: parse_str(): Calling parse_str() without the result argument is deprecated in /in/G1D0O on line 12 NULL
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.20
NULL