What will be the output of the following PHP code?<br/>$str = "Hello! My name is Cameron Fox. Coffee?";<br/>$find = array('/is/','/coffee/');<br/>$replace = array('/was/','/tea/');<br/>echo preg_replace ($find, $replace, $str); Hello! My name was Cameron Fox. tea? Hello! My name is Cameron Fox. tea? Hello! My name is Cameron Fox. Coffee? Hello! My name was Cameron Fox. Coffee? TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following is not a preg PHP function? preg_split preg_matchall preg_match preg_match_all TRUE ANSWER : ? YOUR ANSWER : ?
How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions. 8 7 10 9 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>echo str_pad("Salad", 5)." is good."; is good SaladSaladSaladSaladSalad SaladSaladSaladSaladSalad is good is good Salad Salad is good 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_find() preg_findre() TRUE ANSWER : ? YOUR ANSWER : ?
Which among the following is/are not a metacharacter?<br/>1. /a<br/>2. /A<br/>3. /b<br/>4. /B 1 and 3 Only 1 2, 3 and 4 2 and 4 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_search preg_found preg_find preg_match TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions finds the last occurrence of a string, returning its numerical position? strlast() strrpos() strlastpos() strpos() TRUE ANSWER : ? YOUR ANSWER : ?