- https://www.codewars.com/kata/526dbd6c8c0eb53254000110 Not very secure.
Started at 22:17 02.09.2020 Wednesday Sep.
Finished at 22:24 02.09.2020 Wednesday Sep. (0hrs 7minutes)
<?php | |
# https://www.codewars.com/kata/526dbd6c8c0eb53254000110 Not very secure. | |
function alphanumeric(string $s): bool { | |
return ctype_alnum($s); | |
} | |
#------------------------------------------------------------------------ | |
function alphanumeric(string $s): bool { | |
echo "Input: $s \n"; | |
if(!is_string($s)) return false; | |
$answer = boolval(preg_match('/^[a-z0-9]+$/i',$s)); | |
$answer ? print("It is true.\n") : print("It is false.\n"); | |
return $answer; | |
} |
Started at 22:17 02.09.2020 Wednesday Sep.
Finished at 22:24 02.09.2020 Wednesday Sep. (0hrs 7minutes)