POSIX stands for Portative Operating System Interface for Unix Portative Operating System Interface for Linux Portable Operating System Interface for Unix Portable Operating System Interface for Linux 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."; Cont@ct the @uthor of this @rticle @t n@chiketh@ex@mple.com Contact the author of this article at nachiketh@ex@mple.com Error Contact the author of this article at n@chiketh@ex@mple.com TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions is used to search a string? preg_match preg_find preg_search preg_found TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>echo str_pad("Salad", 5)." is good."; Salad is good is good Salad SaladSaladSaladSaladSalad is good is good SaladSaladSaladSaladSalad 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!"; No Output is returned Username is all lowercase! Username must be all lowercase! Error TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions finds the last occurrence of a string, returning its numerical position? strrpos() strlastpos() strpos() strlast() 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] => pasta [1] => steak [2] => fish [3] => potatoes ) Array ( [1] => steak ) Array ( [0] => potatoes ) Array ( [3] => potatoes ) 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 [2]=>two [3]=>three [4]=>four [5]=>5) Array([1]=> 1) Array([0]=>0 [1]=>1 [5]=>5) TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions will convert a string to all uppercase? strtoupper() uppercase() str_uppercase() struppercase() 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 is Cameron Fox. Coffee? Hello! My name is Cameron Fox. tea? Hello! My name was Cameron Fox. Coffee? TRUE ANSWER : ? YOUR ANSWER : ?