What will be the output of the following PHP code?<br/>echo str_pad("Salad", 5)." is good."; is good SaladSaladSaladSaladSalad is good Salad Salad is good SaladSaladSaladSaladSalad is good TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$foods = array("pasta", "steak", "fish", "potatoes");<br/>$food = preg_grep("/^s/", $foods);<br/>print_r($food); Array ( [1] => steak ) Array ( [0] => potatoes ) Array ( [0] => pasta [1] => steak [2] => fish [3] => potatoes ) Array ( [3] => potatoes ) TRUE ANSWER : ? YOUR ANSWER : ?
How many functions does PHP offer for searching strings using POSIX style regular expression? 7 8 10 9 TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions can be used to concatenate array elements to form a single delimited string? explode() concatenate() implode() concat() TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following is not a preg PHP function? preg_matchall preg_match_all preg_split preg_match TRUE ANSWER : ? YOUR ANSWER : ?
Say we have two compare two strings which of the following function/functions can you use?<br/>1. strcmp()<br/>2. strcasecmp()<br/>3. strspn()<br/>4. strcspn() 3 and 4 None of the mentioned All of the mentioned 1 and 2 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following would be a potential match for the Perl-based regular expression /fo{2,4}/ ?<br/>1. fol<br/>2. fool<br/>3. fooool<br/>4. fooooool 1, 3 and 4 1 and 4 Only 1 2 and 3 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() preg_findre() preg_find_replace() TRUE ANSWER : ? YOUR ANSWER : ?
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!"; Username must be all lowercase! Error Username is all lowercase! No Output is returned TRUE ANSWER : ? YOUR ANSWER : ?