What Will Be The Output Of The Following Php Codep Pre Langphp #145
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?php $username = "jasoN"; if (ereg("([^a-z])",$username)) echo "Username must be all lowercase!"; else echo "Username is all lowercase!"; ?> </code></pre>
This multiple choice question (MCQ) is related to the book/course
gs gs107 PHP: Hypertext Preprocessor.
It can also be found in
gs gs107 Strings and Regular Expressions - PHP Strings & Regular Expressions - Quiz No.1.
What will be the output of the following PHP code?
<?php $username = "jasoN"; if (ereg("([^a-z])",$username)) echo "Username must be all lowercase!"; else echo "Username is all lowercase!"; ?>
Error
Username must be all lowercase!
Username is all lowercase!
No Output is returned