What is PHP?
PHP Programming MCQ Practice
Who is the father of PHP?
What does PHP stand for?
Which of the following is the correct syntax to write a PHP code?
Which of the following is the correct way to add a comment in PHP code?
Which of the following is the default file extension of PHP files?
How to define a function in PHP?
What will be the output of the following PHP code? <?php $x = 10; $y = 20; if ($x > $y && 1||1) print "1000 PHP MCQ" ; else print "Welcome to Sanfoundry"; ?>
Which is the right way of declaring a variable in PHP?
What will be the output of the following PHP program? <?php $fruits = array ("apple", "orange", array ("pear", "mango"),"banana"); echo (count($fruits, 1)); ?>
What will be the output of the following PHP program? <?php function multi($num) { if ($num == 3) echo "I Wonder"; if ($num == 7) echo "Which One"; if ($num == 8) echo "Is The"; if ($num == 19) echo "Correct Answer"; } $can = stripos("I love php, I love php too!","PHP"); multi($can); ?>
Which of the following PHP functions can be used for generating unique ids?
What will be the output of the following PHP code? <?php define("GREETING", "PHP is a scripting language"); echo $GREETING; ?>
A function in PHP which starts with __ (double underscore) is known as __________
How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions.
Which of the following web servers are required to run the PHP script?
What will be the output of the following PHP code snippet? <?php $url = "[email protected]"; echo ltrim(strstr($url, "@"),"@"); ?>
Which of the following PHP functions can be used to get the current memory usage?
Which one of the following PHP function is used to determine a file’s last access time?
What will be the output of the following PHP code? <?php $x = 5; $y = 10; function fun() { $y = $GLOBALS['x'] + $GLOBALS['y']; } fun(); echo $y; ?>
PHP recognizes constructors by the name _________
The developers of PHP deprecated the safe mode feature as of which PHP version?
What will be the value of the variable $input in the following PHP program? <?php $input = "PHP<td>stands for</td>Hypertext<i>Preprocessor</i>!"; $input = strip_tags($input,"<i></i>"); echo $input; ?>
Which of the following variables does PHP use to authenticate a user? i) $_SERVER['PHP_AUTH_USER']. ii) $_SERVER['PHP_AUTH_USERS']. iii) $_SERVER['PHP_AUTH_PU']. iv) $_SERVER['PHP_AUTH_PW'].
What does PDO stand for?
What will be the output of the following PHP program? <?php $a = 100; if ($a > 10) printf("PHP Quiz"); else if ($a > 20) printf("PHP MCQ"); else if($a > 30) printf("PHP Program"); ?>
Which of the looping statements is/are supported by PHP? i) for loop ii) while loop iii) do-while loop iv) foreach loop
Which PHP statement will give output as $x on the screen?
Which version of PHP introduced the advanced concepts of OOP?
What will be the output of the following PHP code? <?php $x = 4; $y = 3 $z = 1; $z = $z + $x + $y; echo "$z"; ?>