MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
php
Quiz 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Q.1
What is the limit of a PHP integer value?
16384
65536
1048576
2147483647
Q.2
PHP considers the following values as False
the integer 0
the one-character string 0
constant NULL
both A and B
All of Above
Q.3
Some PHP code might not have a namespace and therefore lives in the . . . . . . namespace.
Default
Global
PRE
Automatic
Q.4
All classes in the same namespace or subnamespace don’t have to the declared in the same PHP file.
TRUE
FALSE
Q.5
It is possible to create a hierarchy of namespaces in PHP.
TRUE
FALSE
Q.6
The value of __NAMESPACE__ is a string that contains the current namespace name. In global, un-namespaced code, it contains . . . . . .
NULL
0
an empty string
gibberish value
Q.7
With the introduction of namespaces, the same function name can be used in multiple places.
TRUE
FALSE
Q.8
Within a namespace, for accessing the built-in PHP classes you can prefix the class name with a . . . . . and let PHP look in the global class list.
percent
ampersand
asterix
backslash
Q.9
Which of the below namespace declaration is correct?
namespace ORA:
namespace 1_RA;
namespace ORA;
namespace ORA_#;
Q.10
Multiple namespaces cannot be defined in the same file.
TRUE
FALSE
Q.11
As the namespace size grows, using namespaces can become a little repetitious, but PHP also provides the . . . . . statement, which allows you to alias a specific namespace.
php
grant
use
label
Q.12
PHP does not support numbers written in hexadecimal, octal or scientific notation.
True
False
Q.13
PHP ..... demand that you declare a data type when you create a variable.
does
does not
Q.14
strval()
Accepts a value and converts it into a string array
Accepts a value and converts it into an string dictionary
Accepts a value and converts it into string equivalent
None of above
Q.15
What will be the output of the following php code?
<?php
$num
=
"1"
; $num1
=
"2"
;
print
$num
+
$num1;
?>
3
1+2
Error
12
Q.16
You can test the type of any variable with the ..... function.
whattype()
showtype()
gettype()
settype()
Q.17
Assigning the empty string (like ' ') to a variable automatically renders it empty.
True
False
Q.18
If you echo a Boolean variable, the value FALSE displays as a .... and the value TRUE echoes as a .....
0, 1
blank string, 2
empty variable, 1
blank string, 1
Q.19
When a simple data type is casted to an array, an array is created with the original value in the first element.
True
False
Q.20
Which of following variables can be assigned a value to it?
1. $3hello
2. $_hello
3. $this
4. $This
All of the mentioned
Only 2
2, 3 and 4
2 and 4
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)