adplus-dvertising
frame-decoration

Question

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!";
    ?>

a.

Error

b.

Username must be all lowercase!

c.

Username is all lowercase!

d.

No Output is returned

Answer: (b).Username must be all lowercase!

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following PHP code?

Similar Questions

Discover Related MCQs

Q. How many functions does PHP offer for searching strings using POSIX style regular expression?

Q. [:alpha:] can also be specified as..

Q. Which one of the following regular expression matches any string containing zero or one p?

Q. PHP has long supported two regular expression implementations known as _______ and _______

i) Perl
ii) PEAR
iii) Pearl
iv) POSIX

Q. Operator that is used for heredoc syntax

Q. Strstr ( ) function selects a substring by its

Q. Which syntax is very useful for specifying large chunks of interpolated variable text?

Q. Which three functions has intimate relationship with each other?

Q. Function Strcmp ( ) is equals to

Q. How many operators PHP offer for strings?

Q. Dot ". " operator in strings are called as

Q. PHP offers printf ( ) and

Q. Strtupper ( ) function returns

Q. Which function takes a single string and returns its length as an integer?

Q. Which function start its search from backward rather than from beginning?

Q. Literal string specified in PHP code by

Q. What does trailing means in replacement of functions?

Q. Which statement is correct for specifying a string in code?

Q. Concatenating assignment operator is denoted by

Q. For creating pages that contain HTML forms and have multiline strings we can use