I want to check if there is page variable (in URL) and if it is, if it's correct - it cannot be number 1 because this is default page and it should be valid int from 2 to max number of pages (not octal and not hexadecimal).<?php$_GET['page'] = '01'; // this line is only for testing$selPage = 1;$totalPages = 10;if (isset($_GET['page'])) {    $selPage = filter_var($_GET['page'], FILTER_VALIDATE_INT, ['options' => ['min_range' => 2, 'max_range' => $totalPages]]);    if ($selPage === false) {        exit('redirection'); // this line for test only - in fact make 301 redirection here to correct url    }}echo $selPage;Could it be improved anyway, or is it the best and shortest it can be?
Pagination filtering
php;php5;validation;url;pagination