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 2 and 3 1, 3 and 4 1 and 4 Only 1 TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions will convert a string to all uppercase? str_uppercase() struppercase() strtoupper() uppercase() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$url = "contact@examians.com";<br/>echo ltrim(strstr($url, "@"),"@"); examians.com contact contact@examians.com contact@ TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following preg PHP functions is used to take a string, and put it in an array? preg_split() preg_destroy() preg_divide() preg_unchain() TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions finds the last occurrence of a string, returning its numerical position? strlast() strpos() strrpos() strlastpos() 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([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5) Array([2]=>two [3]=>three [4]=>four) Array([1]=> 1) Array([0]=>0 [5]=>5) TRUE ANSWER : ? YOUR ANSWER : ?
PHP has long supported two regular expression implementations known as _______ and _______.<br/>1. Perl<br/>2. PEAR<br/>3. Pearl<br/>4. POSIX 2 and 3 1 and 2 2 and 4 1 and 4 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 Salad is good is good Salad SaladSaladSaladSaladSalad is good 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 2 and 4 Only 1 1 and 3 2, 3 and 4 TRUE ANSWER : ? YOUR ANSWER : ?
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 is Cameron Fox. tea? Hello! My name was Cameron Fox. Coffee? Hello! My name was Cameron Fox. tea? Hello! My name is Cameron Fox. Coffee? TRUE ANSWER : ? YOUR ANSWER : ?