All php mcq are available here.
Which of following variable assignment is 'by value' assignment in PHP
Option 1
|
$value1= & $value? |
Option 2
|
$value1= $value? |
Option 3
|
$value1= & $value? |
Option 4
|
None of these |
Identify the invalid identifier
Option 1
|
my-function |
Option 2
|
size |
Option 3
|
–some word |
Option 4
|
This&that |
Casting operator introduced in PHP 6 is
Option 1
|
(array) |
Option 2
|
(int64) |
Option 3
|
(real) or (double) or (float) |
Option 4
|
(object) |
Which of following is compound data type?
Option 1
|
Array |
Option 2
|
Objects |
Option 3
|
Both of these |
Option 4
|
None of these |
Which data types are treated as arrays
Option 1
|
integer |
Option 2
|
float |
Option 3
|
string |
Option 4
|
booleans |
Which of the following are valid float values?
Option 1
|
4.5678 |
Option 2
|
4.0 |
Option 3
|
7.4 |
Option 4
|
All of these |
When defining identifier in PHP you should remember that
Option 1
|
Identifier are case sensitive. So $result is different than $ result |
Option 2
|
Identifiers can be any length |
Option 3
|
Both of these |
Option 4
|
None of these |
Identify the variable scope that is not supported by PHP
Option 1
|
Global variables |
Option 2
|
Local variables |
Option 3
|
Function parameters |
Option 4
|
Hidden variables |
Study following steps and determine the correct order
(1) Open a connection to MySql server
(2) Execute the SQL query
(3) Fetch the data from query
(4) Select database
(5) Close Connection
Option 1
|
4, 1, 2, 5, 3 |
Option 2
|
1, 4, 2, 3, 5 |
Option 3
|
1, 5, 4, 2, 3 |
Option 4
|
4, 1, 3, 2, 5 |
Which of the following is not a session function?
Option 1
|
session_pw |
Option 2
|
sssion_decode |
Option 3
|
session_destroy |
Option 4
|
session_id |