How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions. 10 8 7 9 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 ( [0] => potatoes ) Array ( [1] => steak ) Array ( [0] => pasta [1] => steak [2] => fish [3] => potatoes ) Array ( [3] => potatoes ) TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following is not a preg PHP function? preg_match preg_split preg_matchall preg_match_all TRUE ANSWER : ? YOUR ANSWER : ?
How many functions does PHP offer for searching strings using POSIX style regular expression? 8 7 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? implode() explode() concatenate() concat() 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 : ?
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() All of the mentioned None of the mentioned 1 and 2 3 and 4 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_findre() preg_find_replace() preg_replace() preg_find() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$author = "nachiketh@example.com";<br/>$author = str_replace("a","@",$author);<br/>echo "Contact the author of this article at $author."; Contact the author of this article at n@chiketh@ex@mple.com Error Contact the author of this article at nachiketh@ex@mple.com Cont@ct the @uthor of this @rticle @t n@chiketh@ex@mple.com TRUE ANSWER : ? YOUR ANSWER : ?