PHP MCQ Question and Answer
PHP MCQ Question and Answer
91. what will be the ouput of below code ? Assume that today is 2009-5-19:2:45:32 pm
<?php
$today = date("F j, Y, g:i a");
<?php
$today = date("F j, Y, g:i a");
- may 19,09,2:45:32 PM
- May 19, 2009, 2:45 pm
- May 19,2009,14:45:32 pm
- May 19,2009,14:45:32 PM
92. Which of the following function is used for terminate the script execution in PHP?
- break()
- quit()
- die()
95. what will be the output of below code ?
<?php
$arr = array(5 => 1, 12 => 2);
$arr[] = 56;
$arr["x"] = 42;
unset($arr);
echo var_dump($arr);
?>
<?php
$arr = array(5 => 1, 12 => 2);
$arr[] = 56;
$arr["x"] = 42;
unset($arr);
echo var_dump($arr);
?>
- 42
- 56
- Null
- x=42
96. PHP variables are
- Multitype variables
- Double type variables
- Single type variable
- Trible type variables
97. Which of these statements is true?
- PHP interfaces to the MySQL database,and you should transfer any data in Oracle or Sybase to MySQL if you want to use PHP on the data.
- PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase. A wrapper layer is provided so that code written for one database can easily be transferred to another if you later switch your database engine.
- PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase but the interface differs in each case.
- There's little code in PHP to help you interface to databases, but there's no reason why you can't write such code if you want to.
99. How would you add 1 to the variable $count?
- incr count;
- $count++;
- $count =+1
- incr $count;
100. Which of the following is used to check if a function has already been defined?
- bool function_exists(functionname)
- bool f_exists(functionname)
- bool func_exist(functioname)