Which one of the following is not a preg PHP function? preg_match_all preg_match preg_matchall preg_split TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$url = "contact@examians.com";<br/>echo ltrim(strstr($url, "@"),"@"); contact contact@ contact@examians.com examians.com TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$number = array(0,1,two,three,four,5);<br/>$num = preg_grep("/[0-5]/", $number);<br/>print_r($num); Array([2]=>two [3]=>three [4]=>four) Array([0]=>0 [1]=>1 [5]=>5) Array([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5) Array([1]=> 1) 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_divide() preg_split() preg_unchain() preg_destroy() TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions finds the last occurrence of a string, returning its numerical position? strrpos() strlast() strpos() strlastpos() TRUE ANSWER : ? YOUR ANSWER : ?
POSIX stands for Portable Operating System Interface for Unix Portative Operating System Interface for Linux Portable Operating System Interface for Linux Portative Operating System Interface for Unix 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 2 and 4 Only 1 2, 3 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 : ?
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 [5]=>5) Array([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5) 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 ( [0] => pasta [1] => steak [2] => fish [3] => potatoes ) Array ( [3] => potatoes ) Array ( [1] => steak ) TRUE ANSWER : ? YOUR ANSWER : ?