3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! $uri = "?sort%5B%5D=1&str%5B%5D=4&curs%5B%5D=1&page=2&page=1&page=2&page=5&page=4&page=3&page=2&page=1&page=1&page=1&page=1&page=1&page=1&page=1&page=1&page=1&page=1&page=1&tesdsd=2"; function ggp($url) { // get GET-parameters string preg_match('/^([^?]+)(\?.*?)?(#.*)?$/', $url, $matches); $gp = (isset($matches[2])) ? $matches[2] : ''; return $gp; } function deleted($url) { // get GET-parameters string $res = preg_match("/([?&])$varname=.*?(?=&|#|\z)/", $url, $matches); return $res,$matches; } echo ggp($uri); echo"<br>"; var_dump(deleted($uri));
Output for 5.3.0 - 5.4.17
Parse error: syntax error, unexpected ',' in /in/aRNFC on line 14
Process exited with code 255.