Voting

: five minus three?
(Example: nine)

The Note You're Voting On

boctulus @ gmail co!m
5 years ago
parse_url() does not parse some obvious errors so I made a complementary function

function url_check(string $url){
$sym = null;

$len = strlen($url);
for ($i=0; $i<$len; $i++){
if ($url[$i] == '?'){
if ($sym == '?' || $sym == '&')
return false;

$sym = '?';
}elseif ($url[$i] == '&'){
if ($sym === null)
return false;

$sym = '&';
}
}
return true;
}
}

<< Back to user notes page

To Top