What will be the output of the following PHP code?<br/>$username = "jasoN";<br/>if (ereg("([^a-z])",$username))<br/>echo "Username must be all lowercase!";<br/>else<br/>echo "Username is all lowercase!"; Error No Output is returned Username must be all lowercase! Username is all lowercase! TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions can be used to concatenate array elements to form a single delimited string? concat() concatenate() implode() explode() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$name = "What is your name?";<br/>if (preg_match("/name/"),$name)<br/>echo "My name is Will Pitt ";<br/>else<br/>echo "My name is not Will Pitt ";<br/>if (preg_match("/are/"))<br/>echo "I am great"else echo "I am not great"; My name is Will Pitt I am not great My name is Will Pitt I am great My name is not Will Pitt I am not great My name is not Will Pitt I am great TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following regular expression matches any string containing zero or one p? p+ P? p# p* TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions is used to search a string? preg_found preg_search preg_match preg_find TRUE ANSWER : ? YOUR ANSWER : ?
POSIX implementation was deprecated in which version of PHP? PHP 4 PHP 5.2 PHP 5.3 PHP 5 TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following preg PHP function is used to do a find and replace on a string or an array? preg_replace() preg_find_replace() preg_findre() preg_find() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output if we replace the line $num = preg_grep(“/[0-5]/”, $number); with $num = preg_grep(“/[0-5]/”, $number, PREG_GREP_INVERT);? Array([2]=>two [3]=>three [4]=>four) Array([1]=> 1) Array([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5) Array([0]=>0 [5]=>5) TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following is not a preg PHP function? preg_match preg_split preg_match_all preg_matchall TRUE ANSWER : ? YOUR ANSWER : ?
How many functions does PHP offer for searching strings using POSIX style regular expression? 8 7 9 10 TRUE ANSWER : ? YOUR ANSWER : ?