Which one of the following functions is used to search a string? preg_match preg_found preg_find preg_search 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 : ?
POSIX stands for Portative Operating System Interface for Linux Portative Operating System Interface for Unix Portable Operating System Interface for Linux Portable Operating System Interface for Unix 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() 3 and 4 1 and 2 None of the mentioned All of the mentioned 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 1 and 4 2 and 4 1 and 2 2 and 3 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([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5) Array([0]=>0 [1]=>1 [5]=>5) Array([1]=> 1) Array([2]=>two [3]=>three [4]=>four) TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions finds the last occurrence of a string, returning its numerical position? strrpos() strpos() strlast() strlastpos() TRUE ANSWER : ? YOUR ANSWER : ?
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 1 and 4 2 and 3 Only 1 1, 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_find() preg_replace() preg_find_replace() preg_findre() 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. I hate dogs. We should marry.) Error You like dogs. I hate dogs. We should marry. Array([0]=>You like dogs. [1]=>I hate dogs. [2]=>We should marry.) TRUE ANSWER : ? YOUR ANSWER : ?