Test for PHP Knowledge. Beginner's Level

Akela
3548
Test for PHP Knowledge. Beginner's Level
PHP is one of the most popular script languages used for web programming by hundreds of thousands of developers. This quiz includes questions on the basic sections of PHP programming and will benefit both professional developers for training and those who have only started to learn this language.

How do you create a PHP file?

php:

How do you assign the value 5 to the a variable?

The $ symbol is placed before the variable name. The variable type is not specified.

int a=5;

int $a=5;

$a=5;

What a value type will be assigned to the $var variable after code execution $var = '123.45';?

string

int

float

By using what symbol can two lines be merged into one?

The asterisk symbol

The plus symbol

The period symbol

What operator is used for displaying output?

print

cout

echo

Can you integrate a PHP code into an HTML code?

Yes

No

What will be in the $var variable after code execution $var = 4 + 8 / 2;?

6

8

4 + 8 / 2

What will be displayed after this code execution?

6, 6

6, 7

5, 6

How do you create a new array?

$array = new array [ ];

$array = array('el', 'el2');

array $array = ["el1"], ["el2"];

How do you get the data of a POST request?

Using variable $_POST

Using variable $POST

Using variable $get_post

By using what function can you delete a cookie?

To delete cookie, you need to specify some time in the past as a period of validity, for example: setcookie("MyCookie", "", time() - 3600);

$COOKIE.delete

deletecookie

setcookie

What operator belongs to the conditional group?

elseif

!==

instanceof

What action does the ** operator carry out?

Multiplication

Raising to power

Character deletion

What's the difference between $a==$b and $a===$b?

$a==$b returns TRUE, if $a and $b are equal after type conversion, and $a===$b – if both variables have the same type initially

$a==$b compares variables, and $a===$b – sets equal

$a===$b is impossible, the === operator does not exist

How do you define a constant for the number Pi?

define("Pi", 3.14159265, true);

const $Pi = 3.14159265;

$Pi = const(3.14159265);

You don't know PHP at the level of Junior PHP developer

Probably, you've only started learning or didn't pay enough attention to the main subjects when studying the language. Don't be upset: remember your mistakes, read theory, train on problems - and try to take the quiz again when you're ready! The developer's way is not easy, but the main thing is to devote enough time to learning and you'll definitely succeed! Show the quiz to friends: do they know PHP at Junior level?

You know the basics of PHP. This is not bad, but not enough for the level of Junior PHP-developer

You're good at the basics and can create a simple project, but there are some important gaps in your knowledge you should close before going on. Read the chapters of a self-help textbook on subjects where you made mistakes in the quiz, train on problems and when you're confident in your knowledge take on more serious subjects. Good luck! Show the quiz to friends: do they know PHP at Junior level?

Junior PHP-developer

Congrats! You know the PHP language at Junior level. Now it's time to learn more complex subjects! And if you're already a developer - repetition won't hurt :)  Show the quiz to friends: do they know PHP at Junior level?

How do you create a PHP file?
1 / 15
How do you assign the value 5 to the a variable?
2 / 15
What a value type will be assigned to the $var variable after code execution $var = '123.45';?
3 / 15
By using what symbol can two lines be merged into one?
4 / 15
What operator is used for displaying output?
5 / 15
Can you integrate a PHP code into an HTML code?
6 / 15
What will be in the $var variable after code execution $var = 4 + 8 / 2;?
7 / 15
What will be displayed after this code execution?
8 / 15
How do you create a new array?
9 / 15
How do you get the data of a POST request?
10 / 15
By using what function can you delete a cookie?
11 / 15
What operator belongs to the conditional group?
12 / 15
What action does the ** operator carry out?
13 / 15
What's the difference between $a==$b and $a===$b?
14 / 15
How do you define a constant for the number Pi?
15 / 15

Calculating results...

Useful and short ads help us create new content every day.