PHP interview questions and answers article which make you confident to prepare PHP certificate exam. Use the PHP online quiz test to prepare about PHP basic question which generally use in beginner interview process.
This online PHP test include 10 Multi Choice questions related to PHP Basic, Variable, Syntax, function.
How to define a constant in PHP?
define (MYCONSTANT, "100");
define (”MYCONSTANT”, 100);
SET (”MYCONSTANT”, 100);
assign (”MYCONSTANT”, "100");
Correct!
Wrong!
The default timeout of a PHP session is....
1440 seconds
1800 seconds
Until the browser is closed
Never
Correct!
Wrong!
Which function is used to convert an array into a string?
implode()
str_split()
explode()
arr_split()
Correct!
Wrong!
Which function is used to find the number of parameters passed into a function ?
func_num()
num_args()
func_num_args()
func_num_arg()
Correct!
Wrong!
How to sort an array by key?
key_sort()
num_args()
k_sort()
ksort_arr()
Correct!
Wrong!
Which function is used to count number of elements on $array?
countof($array)
num($array)
size_num($array)
sizeof($array)
Correct!
Wrong!
How to add a multi line comment in PHP?
/*This is a comment/*
//This is a comment
/*This is a comment*/
*/ This is a comment /*
Correct!
Wrong!
Which of the following is not a valid variable?
$_variable1
$variable_1
$1_Variable
$Variable
Correct!
Wrong!
Which of the following is not a SuperGlobal?
$_SERVER
$_GET
$php_errormsg
$GLOBALS
Correct!
Wrong!
To find the number of characters in the string variable $var, which function should be used?
count($var)
strlen($var)
str_len($var)
len($var)
Correct!
Wrong!
Share the quiz to show your results !
Subscribe to see your results
PHP interview questions
I got %%score%% of %%total%% right
%%description%%
%%description%%
Loading...