3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'component/content/article?id=9'; $query = parse_url($str, PHP_URL_QUERY); // Get the string part after the "?" parse_str($query, $params); print $params['id'];

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
187.18 ms | 2806 KiB | 10 Q