Sign UpLogin With Facebook
Sign UpLogin With Google

PHP Quiz: beginner level (1/3)

Which of the following syntaxes is correct?
void my_function(int param) {
function my_function(int $param) (
function my_function($param) (
function my_function($param) {
What is the difference between include and require?
"Require" supports the inclusion of folders, while "include" does not allow it
"Include" includes only one file, while "require" can include filenames with wildcards
There is no difference, "require" is just an alias for "include"
"require" stops the script execution if the file does not exist, while "include" only gives out a warning
Which of the following functions does not exist in PHP?
What is the correct syntax for specifying a default argument value in a function?
function my_function(null $param1)
function my_function($param1 null)
function my_function($param1=null)
function my_function($param1==null)
How do you return a value within a function?
result $var;
return $var;
What is the difference between require and require_once?
"require_once" ensures the specified file is only included once
"require" allows you to include multiple files in one call, while "require_once" does not
"require_once" is an alias for "require"
"require" is an instruction while "require_once" is a function
What will be displayed after you execute the following: echo 'hello $world';
hello $world
It depends on the value of $world
It will not work due to a syntax error
hello world
$var = "5"."6"; What is the value of $var ?
What is the purpose of the "foreach" instruction?
It does not exist in PHP
It is an alias of the instruction "for"
It loops through the specified array
It allows you to reach a different part of the program
How do you define a constant?
set(MY_CONSTANT, "value");
define MY_CONSTANT = "value";
define("MY_CONSTANT", "value");
set MY_CONSTANT=value;
{"name":"PHP Quiz: beginner level (1\/3) - Take the Quiz", "url":"","txt":"Which of the following syntaxes is correct?, What is the difference between include and require?, Which of the following functions does not exist in PHP?","img":""}