Q. What is the result of the following PHP code?
Code:
<?php
$username = "Alex";
if (preg_match("([^a-z])",$username))
echo "Username must be all lowercase!";
else
echo "Username is all lowercase!";
?>
β
Correct Answer: (B)
Username must be all lowercase!
Explanation: The built-in function preg_match() returns whether a match was found in a string.