3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $uri = "http://fashion/ru/items/2?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 preg_match('/^([^&page=]+)(*)$/', $url, $matches); return $matches; } echo ggp($uri); echo"<br>"; var_dump(deleted($uri));
Output for 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
?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<br> Warning: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 14 in /in/iqqrV on line 12 NULL
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33
?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<br> Warning: preg_match(): Compilation failed: nothing to repeat at offset 14 in /in/iqqrV on line 12 NULL
Output for 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
?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<br> Warning: preg_match(): Compilation failed: nothing to repeat at offset 14 in /in/iqqrV on line 12 array(0) { }
Output for 4.3.0 - 4.3.10
?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<br> Warning: Compilation failed: nothing to repeat at offset 14 in /in/iqqrV on line 12 array(0) { }

preferences:
232.63 ms | 402 KiB | 312 Q