3v4l.org

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

preferences:
44.12 ms | 402 KiB | 5 Q