It's impossible to develop in any language without variables and constants. Do you know this subject for the PHP language? Take the quiz and evaluate your knowledge level!
How are variables denoted in PHP?
What variable name is incorrect?
Value 5 was set to the $a variable, then the $b=&$a variable was declared, after that $b was equated to 10. What are the values of $a and $b?
Are $b and $c equal after this code execution?
$c=7, $b=1, since variables $b and $c aren't related by link and their values change independently of each other
How do you declare a constant correctly?
define ($name, $value, $case_sensitivity);
const $name = $value;
$name = value;
How to tell whether a constant was defined?
What system constant ...contains the name of the current file?
How to enter text "1+3" into a variable?
What will be the result of code execution: echo $_SERVER["PHP_SELF"];?
The server name will be entered
The current file location will be entered
Is the $__MYVAR__ name correct for a variable?
This is a correct declaration, but it’s better not to use it: PHP can register such a system constant once, that will disrupt the script functioning
Yes, but undesirable
It this link equating correctly: $bar = &(24 * 7); ?
A link cannot direct an unnamed expression.
What will appear on the screen after code execution?
hello world world
hello world hello world
There will be an error
In what case will the $_REQUEST['username']; variable have a value?
If the $username variable has a value
If there’s a SWL request named username
If the username field was filled in a form
You know the subject at a basic level
Probably, you've only started to learn PHP and are in the dark about all the nuances of variable usage. Make sure to learn the theory and solve problems, and you'll definitely succeed! Share the quiz with friends and check their knowledge :)
You know the subject at middle level
You can use variables and constants correctly, however, more complex problems can raise difficulties. Train on problems, flip through a self-teaching textbook and you'll definitely succeed! Share the quiz with friends and check their knowledge :)
You know the subject in perfection
You mastered the subject and can use variables with no problems in any cases. Congrats! You can take on more complex subjects :) Share the quiz with friends and check their knowledge :)