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() All of the mentioned None of the mentioned 3 and 4 1 and 2 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$text = "this istsome text thatnwe might like to parse.";<br/>print_r(split("[nt]",$text)); Array ( [0] => some text that [1] => we might like to parse. ) this is some text that we might like to parse. Array ( [0] => this is [1] => some text that [2] => we might like to parse. ) [0] => this is [1] => some text that [2] => we might like to parse. 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() concat() concatenate() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$author = "nachiketh@example.com";<br/>$author = str_replace("a","@",$author);<br/>echo "Contact the author of this article at $author."; Contact the author of this article at n@chiketh@ex@mple.com Contact the author of this article at nachiketh@ex@mple.com Cont@ct the @uthor of this @rticle @t n@chiketh@ex@mple.com Error 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_destroy() preg_split() preg_unchain() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$username = "jasoN";<br/>if (ereg("([^a-z])",$username))<br/>echo "Username must be all lowercase!";<br/>else<br/>echo "Username is all lowercase!"; Username must be all lowercase! No Output is returned Error Username is all lowercase! 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 : ?
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 : ?
How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions. 9 10 7 8 TRUE ANSWER : ? YOUR ANSWER : ?