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() 1 and 2 None of the mentioned All of the mentioned 3 and 4 TRUE ANSWER : ? YOUR ANSWER : ?
Parameter flags was added in which version of PHP? PHP 4.2 PHP 4.3 PHP 4.0 PHP 4.1 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 was Cameron Fox. tea? Hello! My name was Cameron Fox. Coffee? Hello! My name is Cameron Fox. tea? Hello! My name is Cameron Fox. Coffee? 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 is all lowercase! Error Username must be all lowercase! No Output is returned 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 : ?
What will be the output of the following PHP code?<br/>$url = "contact@examians.com";<br/>echo ltrim(strstr($url, "@"),"@"); contact@examians.com contact contact@ examians.com 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 1 and 3 Only 1 2, 3 and 4 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 ( [3] => potatoes ) Array ( [1] => steak ) Array ( [0] => pasta [1] => steak [2] => fish [3] => potatoes ) Array ( [0] => potatoes ) 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, 3 and 4 Only 1 1 and 4 2 and 3 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 : ?