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([1]=> 1) Array([0]=>0 [1]=>1 [5]=>5) Array([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5) TRUE ANSWER : ? YOUR ANSWER : ?
POSIX implementation was deprecated in which version of PHP? PHP 5 PHP 5.2 PHP 4 PHP 5.3 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([1]=> 1) Array([2]=>two [3]=>three [4]=>four) Array([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5) Array([0]=>0 [5]=>5) TRUE ANSWER : ? YOUR ANSWER : ?
POSIX stands for Portable Operating System Interface for Unix Portable Operating System Interface for Linux Portative Operating System Interface for Unix Portative Operating System Interface for Linux 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 can be used to concatenate array elements to form a single delimited string? explode() implode() concatenate() concat() 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_destroy() preg_divide() preg_unchain() preg_split() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$line = "You like dogs. I hate dogs. We should marry."<br/>$sen = preg_split('/./', $line);<br/>print_r($sen); Array([0]=>You like dogs. [1]=>I hate dogs. [2]=>We should marry.) You like dogs. I hate dogs. We should marry. Error Array([0]=>You like dogs. I hate dogs. We should marry.) 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 will convert a string to all uppercase? struppercase() str_uppercase() strtoupper() uppercase() TRUE ANSWER : ? YOUR ANSWER : ?