3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$queryString = $_SERVER['QUERY_STRING']; $queryString = 'token=abc+def'; $part1 = explode('=', $queryString)[0]; $part2 = urlencode(explode('=', $queryString)[1]); $string = $part1 . '=' . $part2; parse_str($string,$result); var_dump($result);
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.28, 7.4.0 - 7.4.16, 8.0.0 - 8.0.3
array(1) { ["token"]=> string(7) "abc+def" }