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'];

preferences:
65.81 ms | 405 KiB | 5 Q