<?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("/([?&])$page=.*?(?=&|#|\z)/", $url, $matches);
return array($res,$matches);
}
echo ggp($uri);
echo"<br>";
var_dump(deleted($uri));
$string = 'April 15, 2003';
$pattern = '/(\w+) (\d+), (\d+)/i';
$replacement = '${1}1,$3';
echo preg_replace($pattern, $replacement, $string);
echo preg_replace("/&page=/", "YPA", $uri);
- Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- <br>
Warning: Undefined variable $page in /in/hbq0J on line 12
array(2) {
[0]=>
int(0)
[1]=>
array(0) {
}
}
April1,2003?sort%5B%5D=1&str%5B%5D=4&curs%5B%5D=1YPA2YPA1YPA2YPA5YPA4YPA3YPA2YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1&tesdsd=2
- Output for 5.0.4 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.2.29 - 7.2.33, 7.3.12 - 7.3.31, 7.4.0 - 7.4.33
- <br>
Notice: Undefined variable: page in /in/hbq0J on line 12
array(2) {
[0]=>
int(0)
[1]=>
array(0) {
}
}
April1,2003?sort%5B%5D=1&str%5B%5D=4&curs%5B%5D=1YPA2YPA1YPA2YPA5YPA4YPA3YPA2YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1&tesdsd=2
- Output for 7.3.32 - 7.3.33
- <br>array(2) {
[0]=>
int(0)
[1]=>
array(0) {
}
}
April1,2003?sort%5B%5D=1&str%5B%5D=4&curs%5B%5D=1YPA2YPA1YPA2YPA5YPA4YPA3YPA2YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1&tesdsd=2
- Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.3
- <br>
Notice: Undefined variable: page in /in/hbq0J on line 12
array(2) {
[0]=>
int(0)
[1]=>
array(0) {
}
}
April1,2003?sort%5B%5D=1&str%5B%5D=4&curs%5B%5D=1YPA2YPA1YPA2YPA5YPA4YPA3YPA2YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1YPA1&tesdsd=2
preferences:
261.09 ms | 402 KiB | 352 Q