think: offитог 85.0% · стаб. 65.2% · время 13.4 мин
think: lowитог 90.9% · стаб. 82.4% · время 38.9 мин
think: mediumитог 90.8% · стаб. 84.5% · время 47.6 мин
L1
L2
L3
L4
L5
L6
L7
L8
L9
L10
L1
L2
L3
L4
L5
L6
L7
L8
L9
L10
L1
L2
L3
L4
L5
L6
L7
L8
L9
L10
Syntax and operators
100
T01-L1 · Syntax and operators
Double-quoted and single-quoted strings are processed identically; the difference is only in speed.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T01-L2 · Syntax and operators
The ?? operator follows isset semantics and raises no warnings for undefined variables.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T01-L3 · Syntax and operators
What will this print: echo 'a', 'b';
Верный ответ: ab
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
0
T01-L4 · Syntax and operators
print returns the value 1 and can be used inside an expression.
Верный ответ: yes
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
T01-L5 · Syntax and operators
The ?: (elvis) operator returns its left operand when it is falsy.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T01-L6 · Syntax and operators
In PHP 8, the concatenation operator (.) has lower precedence than addition and subtraction.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T01-L7 · Syntax and operators
The expression 2 ** 3 ** 2 in PHP evaluates as (2 ** 3) ** 2, that is, 64.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
T01-L8 · Syntax and operators
What string will this print: echo 'sum: ' . 2 + 3; (PHP 8)?
Верный ответ: сумма: 5
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✗
40
T01-L9 · Syntax and operators
What does this code output?
```php
echo intdiv(7, 2) . intdiv(-7, 2);
```
Верный ответ: 3-3
run-72: ✗ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✗
20
T01-L10 · Syntax and operators
What does this code output?
```php
echo -3 ** 2;
```
Верный ответ: -9
run-72: ✓ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
70.0%
100
T01-L1 · Syntax and operators
Double-quoted and single-quoted strings are processed identically; the difference is only in speed.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T01-L2 · Syntax and operators
The ?? operator follows isset semantics and raises no warnings for undefined variables.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T01-L3 · Syntax and operators
What will this print: echo 'a', 'b';
Верный ответ: ab
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T01-L4 · Syntax and operators
print returns the value 1 and can be used inside an expression.
Верный ответ: yes
run-77: ✓ · run-78: ✗ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T01-L5 · Syntax and operators
The ?: (elvis) operator returns its left operand when it is falsy.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
60
T01-L6 · Syntax and operators
In PHP 8, the concatenation operator (.) has lower precedence than addition and subtraction.
Верный ответ: yes
run-77: ✗ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✗
100
T01-L7 · Syntax and operators
The expression 2 ** 3 ** 2 in PHP evaluates as (2 ** 3) ** 2, that is, 64.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
40
T01-L8 · Syntax and operators
What string will this print: echo 'sum: ' . 2 + 3; (PHP 8)?
Верный ответ: сумма: 5
run-77: ✓ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✓
100
T01-L9 · Syntax and operators
What does this code output?
```php
echo intdiv(7, 2) . intdiv(-7, 2);
```
Верный ответ: 3-3
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T01-L10 · Syntax and operators
What does this code output?
```php
echo -3 ** 2;
```
Верный ответ: -9
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
88.0%
100
T01-L1 · Syntax and operators
Double-quoted and single-quoted strings are processed identically; the difference is only in speed.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T01-L2 · Syntax and operators
The ?? operator follows isset semantics and raises no warnings for undefined variables.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T01-L3 · Syntax and operators
What will this print: echo 'a', 'b';
Верный ответ: ab
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
60
T01-L4 · Syntax and operators
print returns the value 1 and can be used inside an expression.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✗ · run-98: ✗ · run-99: ✓
100
T01-L5 · Syntax and operators
The ?: (elvis) operator returns its left operand when it is falsy.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
60
T01-L6 · Syntax and operators
In PHP 8, the concatenation operator (.) has lower precedence than addition and subtraction.
Верный ответ: yes
run-100: ✗ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✗
100
T01-L7 · Syntax and operators
The expression 2 ** 3 ** 2 in PHP evaluates as (2 ** 3) ** 2, that is, 64.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
20
T01-L8 · Syntax and operators
What string will this print: echo 'sum: ' . 2 + 3; (PHP 8)?
Верный ответ: сумма: 5
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✓
100
T01-L9 · Syntax and operators
What does this code output?
```php
echo intdiv(7, 2) . intdiv(-7, 2);
```
Верный ответ: 3-3
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T01-L10 · Syntax and operators
What does this code output?
```php
echo -3 ** 2;
```
Верный ответ: -9
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
84.0%
Types and comparisons
100
T02-L1 · Types and comparisons
With strict comparison (===), arrays are considered equal regardless of element order.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T02-L2 · Types and comparisons
The comparison 0 == false returns false because it is a strict comparison.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
T02-L3 · Types and comparisons
In PHP 8, the expression "abc" == 0 returns true.
Верный ответ: no
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
80
T02-L4 · Types and comparisons
Under loose comparison, null equals 0, the empty string, and false at the same time.
Верный ответ: yes
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T02-L5 · Types and comparisons
What does the expression (int) '42abc' return?
Верный ответ: 42
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T02-L6 · Types and comparisons
What does the expression '5' + 5 return?
Верный ответ: 10
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
40
T02-L7 · Types and comparisons
When cast to string, false becomes "0".
Верный ответ: no
run-72: ✗ · run-73: ✓ · run-74: ✗ · run-75: ✗ · run-76: ✓
100
T02-L8 · Types and comparisons
The comparison 0.1 + 0.2 === 0.3 returns false.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T02-L9 · Types and comparisons
What does this code output?
```php
echo '1e1' == '10' ? 'true' : 'false';
```
Верный ответ: true
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T02-L10 · Types and comparisons
What does this code output?
```php
switch ('a') {
case 0: echo 'zero'; break;
default: echo 'other';
}
```
Верный ответ: other
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
88.0%
100
T02-L1 · Types and comparisons
With strict comparison (===), arrays are considered equal regardless of element order.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T02-L2 · Types and comparisons
The comparison 0 == false returns false because it is a strict comparison.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T02-L3 · Types and comparisons
In PHP 8, the expression "abc" == 0 returns true.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T02-L4 · Types and comparisons
Under loose comparison, null equals 0, the empty string, and false at the same time.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T02-L5 · Types and comparisons
What does the expression (int) '42abc' return?
Верный ответ: 42
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T02-L6 · Types and comparisons
What does the expression '5' + 5 return?
Верный ответ: 10
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T02-L7 · Types and comparisons
When cast to string, false becomes "0".
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T02-L8 · Types and comparisons
The comparison 0.1 + 0.2 === 0.3 returns false.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T02-L9 · Types and comparisons
What does this code output?
```php
echo '1e1' == '10' ? 'true' : 'false';
```
Верный ответ: true
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✗ · run-81: ✓
40
T02-L10 · Types and comparisons
What does this code output?
```php
switch ('a') {
case 0: echo 'zero'; break;
default: echo 'other';
}
```
Верный ответ: other
run-77: ✓ · run-78: ✓ · run-79: ✗ · run-80: ✗ · run-81: ✗
92.0%
100
T02-L1 · Types and comparisons
With strict comparison (===), arrays are considered equal regardless of element order.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T02-L2 · Types and comparisons
The comparison 0 == false returns false because it is a strict comparison.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T02-L3 · Types and comparisons
In PHP 8, the expression "abc" == 0 returns true.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T02-L4 · Types and comparisons
Under loose comparison, null equals 0, the empty string, and false at the same time.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T02-L5 · Types and comparisons
What does the expression (int) '42abc' return?
Верный ответ: 42
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T02-L6 · Types and comparisons
What does the expression '5' + 5 return?
Верный ответ: 10
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T02-L7 · Types and comparisons
When cast to string, false becomes "0".
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T02-L8 · Types and comparisons
The comparison 0.1 + 0.2 === 0.3 returns false.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T02-L9 · Types and comparisons
What does this code output?
```php
echo '1e1' == '10' ? 'true' : 'false';
```
Верный ответ: true
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
40
T02-L10 · Types and comparisons
What does this code output?
```php
switch ('a') {
case 0: echo 'zero'; break;
default: echo 'other';
}
```
Верный ответ: other
run-100: ✓ · run-101: ✓ · run-97: ✗ · run-98: ✗ · run-99: ✗
94.0%
Strings
100
T03-L1 · Strings
strrev() correctly reverses a UTF-8 string.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T03-L2 · Strings
str_contains('Hello world', 'world') returns true.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T03-L3 · Strings
str_pad() can pad a string on the right side only.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T03-L4 · Strings
By default trim() strips only spaces, leaving tabs and newlines intact.
Верный ответ: no
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T03-L5 · Strings
How many BYTES does strlen('héllo') return for a UTF-8 string?
Верный ответ: 12
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T03-L6 · Strings
What does substr('abcdef', -3) return?
Верный ответ: def
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T03-L7 · Strings
ucfirst() modifies the string passed to it in place.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T03-L8 · Strings
Variable interpolation works in heredoc but not in nowdoc.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
0
T03-L9 · Strings
What does this code output?
```php
echo strtr('abc', ['a' => '1', 'ab' => '2']);
```
Верный ответ: 2c
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
T03-L10 · Strings
What does this code output?
```php
echo '[' . substr('hello', -10) . ']';
```
Верный ответ: [hello]
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
88.0%
100
T03-L1 · Strings
strrev() correctly reverses a UTF-8 string.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T03-L2 · Strings
str_contains('Hello world', 'world') returns true.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T03-L3 · Strings
str_pad() can pad a string on the right side only.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T03-L4 · Strings
By default trim() strips only spaces, leaving tabs and newlines intact.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T03-L5 · Strings
How many BYTES does strlen('héllo') return for a UTF-8 string?
Верный ответ: 12
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T03-L6 · Strings
What does substr('abcdef', -3) return?
Верный ответ: def
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T03-L7 · Strings
ucfirst() modifies the string passed to it in place.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T03-L8 · Strings
Variable interpolation works in heredoc but not in nowdoc.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T03-L9 · Strings
What does this code output?
```php
echo strtr('abc', ['a' => '1', 'ab' => '2']);
```
Верный ответ: 2c
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
0
T03-L10 · Strings
What does this code output?
```php
echo '[' . substr('hello', -10) . ']';
```
Верный ответ: [hello]
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
90.0%
100
T03-L1 · Strings
strrev() correctly reverses a UTF-8 string.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T03-L2 · Strings
str_contains('Hello world', 'world') returns true.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T03-L3 · Strings
str_pad() can pad a string on the right side only.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T03-L4 · Strings
By default trim() strips only spaces, leaving tabs and newlines intact.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T03-L5 · Strings
How many BYTES does strlen('héllo') return for a UTF-8 string?
Верный ответ: 12
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T03-L6 · Strings
What does substr('abcdef', -3) return?
Верный ответ: def
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T03-L7 · Strings
ucfirst() modifies the string passed to it in place.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T03-L8 · Strings
Variable interpolation works in heredoc but not in nowdoc.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T03-L9 · Strings
What does this code output?
```php
echo strtr('abc', ['a' => '1', 'ab' => '2']);
```
Верный ответ: 2c
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
20
T03-L10 · Strings
What does this code output?
```php
echo '[' . substr('hello', -10) . ']';
```
Верный ответ: [hello]
run-100: ✗ · run-101: ✓ · run-97: ✗ · run-98: ✗ · run-99: ✗
92.0%
Arrays
100
T04-L1 · Arrays
The sort() function preserves the key-to-value association of the array.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T04-L2 · Arrays
The string key '5' in an array is stored as the integer 5.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
100
T04-L3 · Arrays
The in_array() function uses strict comparison (===) by default.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T04-L4 · Arrays
Without a callback, array_filter() removes all "empty" (falsy) elements from the array.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
40
T04-L5 · Arrays
By default, array_slice() preserves the original numeric keys of the array.
Верный ответ: no
run-72: ✗ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✗
100
T04-L6 · Arrays
What does array_slice([10, 20, 30, 40], 1, 2) return?
Верный ответ: [20,30]
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T04-L7 · Arrays
How many elements will count(['a' => 1] + ['a' => 9, 'b' => 2]) return?
Верный ответ: 2
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
T04-L8 · Arrays
Since PHP 8.1, the spread operator [...$a, ...$b] supports arrays with string keys.
Верный ответ: yes
run-72: ✗ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T04-L9 · Arrays
What does this code output?
```php
$a = ['k' => 1, 'n' => 2];
$b = ['k' => 9, 'm' => 3];
echo implode(',', array_keys($a + $b));
```
Верный ответ: k,n,m
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
0
T04-L10 · Arrays
What does this code output?
```php
$a = [[1, 'x', 2], [2, 'y', 1], [3, 'z', 2]];
usort($a, fn($p, $q) => $p[2] <=> $q[2]);
echo implode('', array_column($a, 1));
```
Верный ответ: yxz
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
78.0%
100
T04-L1 · Arrays
The sort() function preserves the key-to-value association of the array.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T04-L2 · Arrays
The string key '5' in an array is stored as the integer 5.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T04-L3 · Arrays
The in_array() function uses strict comparison (===) by default.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T04-L4 · Arrays
Without a callback, array_filter() removes all "empty" (falsy) elements from the array.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T04-L5 · Arrays
By default, array_slice() preserves the original numeric keys of the array.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T04-L6 · Arrays
What does array_slice([10, 20, 30, 40], 1, 2) return?
Верный ответ: [20,30]
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T04-L7 · Arrays
How many elements will count(['a' => 1] + ['a' => 9, 'b' => 2]) return?
Верный ответ: 2
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T04-L8 · Arrays
Since PHP 8.1, the spread operator [...$a, ...$b] supports arrays with string keys.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T04-L9 · Arrays
What does this code output?
```php
$a = ['k' => 1, 'n' => 2];
$b = ['k' => 9, 'm' => 3];
echo implode(',', array_keys($a + $b));
```
Верный ответ: k,n,m
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T04-L10 · Arrays
What does this code output?
```php
$a = [[1, 'x', 2], [2, 'y', 1], [3, 'z', 2]];
usort($a, fn($p, $q) => $p[2] <=> $q[2]);
echo implode('', array_column($a, 1));
```
Верный ответ: yxz
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100.0%
100
T04-L1 · Arrays
The sort() function preserves the key-to-value association of the array.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T04-L2 · Arrays
The string key '5' in an array is stored as the integer 5.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T04-L3 · Arrays
The in_array() function uses strict comparison (===) by default.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T04-L4 · Arrays
Without a callback, array_filter() removes all "empty" (falsy) elements from the array.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T04-L5 · Arrays
By default, array_slice() preserves the original numeric keys of the array.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T04-L6 · Arrays
What does array_slice([10, 20, 30, 40], 1, 2) return?
Верный ответ: [20,30]
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T04-L7 · Arrays
How many elements will count(['a' => 1] + ['a' => 9, 'b' => 2]) return?
Верный ответ: 2
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T04-L8 · Arrays
Since PHP 8.1, the spread operator [...$a, ...$b] supports arrays with string keys.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✗ · run-99: ✓
100
T04-L9 · Arrays
What does this code output?
```php
$a = ['k' => 1, 'n' => 2];
$b = ['k' => 9, 'm' => 3];
echo implode(',', array_keys($a + $b));
```
Верный ответ: k,n,m
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T04-L10 · Arrays
What does this code output?
```php
$a = [[1, 'x', 2], [2, 'y', 1], [3, 'z', 2]];
usort($a, fn($p, $q) => $p[2] <=> $q[2]);
echo implode('', array_column($a, 1));
```
Верный ответ: yxz
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
98.0%
Functions and closures
40
T05-L1 · Functions and closures
Named arguments cannot be combined with argument unpacking ...$args in a single call.
Верный ответ: no
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✓
100
T05-L2 · Functions and closures
An anonymous function without use sees variables from the outer scope.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T05-L3 · Functions and closures
What will func_num_args() return inside function f($a) { return func_num_args(); } when called as f(1, 2, 3)?
Верный ответ: 3
run-72: ⬜ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T05-L4 · Functions and closures
The body of an arrow function fn may consist of several expressions in curly braces.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
60
T05-L5 · Functions and closures
An arrow function fn captures outer variables by reference (lazily, at use time).
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✗
60
T05-L6 · Functions and closures
A closure declared as static function () {} does not capture $this.
Верный ответ: yes
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T05-L7 · Functions and closures
What will this print: $x = 5; $f = function () use ($x) { return $x; }; $x = 7; echo $f();
Верный ответ: 5
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T05-L8 · Functions and closures
In weak typing mode (without strict_types), passing the string "5" to an int parameter is allowed.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T05-L9 · Functions and closures
What does this code output?
```php
class P
{
private int $v = 3;
public function g(): int { return $this->v; }
}
$p = new P;
$f = $p->g(...);
$p = null;
echo $f();
```
Верный ответ: 3
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T05-L10 · Functions and closures
What does this code output?
```php
function f(int $a, int $b): int
{
return $a - $b;
}
echo f(...['b' => 1, 'a' => 5]);
```
Верный ответ: 4
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80.0%
100
T05-L1 · Functions and closures
Named arguments cannot be combined with argument unpacking ...$args in a single call.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T05-L2 · Functions and closures
An anonymous function without use sees variables from the outer scope.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T05-L3 · Functions and closures
What will func_num_args() return inside function f($a) { return func_num_args(); } when called as f(1, 2, 3)?
Верный ответ: 3
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T05-L4 · Functions and closures
The body of an arrow function fn may consist of several expressions in curly braces.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T05-L5 · Functions and closures
An arrow function fn captures outer variables by reference (lazily, at use time).
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T05-L6 · Functions and closures
A closure declared as static function () {} does not capture $this.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T05-L7 · Functions and closures
What will this print: $x = 5; $f = function () use ($x) { return $x; }; $x = 7; echo $f();
Верный ответ: 5
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T05-L8 · Functions and closures
In weak typing mode (without strict_types), passing the string "5" to an int parameter is allowed.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T05-L9 · Functions and closures
What does this code output?
```php
class P
{
private int $v = 3;
public function g(): int { return $this->v; }
}
$p = new P;
$f = $p->g(...);
$p = null;
echo $f();
```
Верный ответ: 3
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T05-L10 · Functions and closures
What does this code output?
```php
function f(int $a, int $b): int
{
return $a - $b;
}
echo f(...['b' => 1, 'a' => 5]);
```
Верный ответ: 4
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100.0%
100
T05-L1 · Functions and closures
Named arguments cannot be combined with argument unpacking ...$args in a single call.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T05-L2 · Functions and closures
An anonymous function without use sees variables from the outer scope.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T05-L3 · Functions and closures
What will func_num_args() return inside function f($a) { return func_num_args(); } when called as f(1, 2, 3)?
Верный ответ: 3
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T05-L4 · Functions and closures
The body of an arrow function fn may consist of several expressions in curly braces.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T05-L5 · Functions and closures
An arrow function fn captures outer variables by reference (lazily, at use time).
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✗ · run-98: ✓ · run-99: ✓
100
T05-L6 · Functions and closures
A closure declared as static function () {} does not capture $this.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T05-L7 · Functions and closures
What will this print: $x = 5; $f = function () use ($x) { return $x; }; $x = 7; echo $f();
Верный ответ: 5
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T05-L8 · Functions and closures
In weak typing mode (without strict_types), passing the string "5" to an int parameter is allowed.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T05-L9 · Functions and closures
What does this code output?
```php
class P
{
private int $v = 3;
public function g(): int { return $this->v; }
}
$p = new P;
$f = $p->g(...);
$p = null;
echo $f();
```
Верный ответ: 3
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T05-L10 · Functions and closures
What does this code output?
```php
function f(int $a, int $b): int
{
return $a - $b;
}
echo f(...['b' => 1, 'a' => 5]);
```
Верный ответ: 4
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
98.0%
OOP: classes and inheritance
100
T06-L1 · OOP: classes and inheritance
PHP supports constructor property promotion: public function __construct(private int $x) {}.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T06-L2 · OOP: classes and inheritance
Which keyword prevents a method from being overridden in subclasses?
Верный ответ: final
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T06-L3 · OOP: classes and inheritance
A method declared final cannot be overridden in a subclass.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T06-L4 · OOP: classes and inheritance
Parent properties with private visibility are accessible in a subclass.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T06-L5 · OOP: classes and inheritance
What does get_class(new class {}) return? Answer with the part of the name before the NUL byte (without the file path).
Верный ответ: class@anonymous
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T06-L6 · OOP: classes and inheritance
A private parent method is not part of the inheritance contract: a child may declare a method with the same name and any visibility.
Верный ответ: yes
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T06-L7 · OOP: classes and inheritance
The magic method __get() is called only for non-existent properties.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T06-L8 · OOP: classes and inheritance
What does reassigning a readonly property throw — Exception or Error?
Верный ответ: error
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T06-L9 · OOP: classes and inheritance
What does this code output?
```php
class A
{
public function who(): string { return static::class; }
}
class B extends A {}
echo (new B)->who();
```
Верный ответ: b
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T06-L10 · OOP: classes and inheritance
What does this code output on PHP 8.5?
```php
class C
{
public int $x = 0 {
set { $this->x = $value * 2; }
}
}
$c = new C;
$c->x = 5;
echo $c->x;
```
Верный ответ: 10
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
96.0%
100
T06-L1 · OOP: classes and inheritance
PHP supports constructor property promotion: public function __construct(private int $x) {}.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T06-L2 · OOP: classes and inheritance
Which keyword prevents a method from being overridden in subclasses?
Верный ответ: final
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T06-L3 · OOP: classes and inheritance
A method declared final cannot be overridden in a subclass.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T06-L4 · OOP: classes and inheritance
Parent properties with private visibility are accessible in a subclass.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T06-L5 · OOP: classes and inheritance
What does get_class(new class {}) return? Answer with the part of the name before the NUL byte (without the file path).
Верный ответ: class@anonymous
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T06-L6 · OOP: classes and inheritance
A private parent method is not part of the inheritance contract: a child may declare a method with the same name and any visibility.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T06-L7 · OOP: classes and inheritance
The magic method __get() is called only for non-existent properties.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T06-L8 · OOP: classes and inheritance
What does reassigning a readonly property throw — Exception or Error?
Верный ответ: error
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T06-L9 · OOP: classes and inheritance
What does this code output?
```php
class A
{
public function who(): string { return static::class; }
}
class B extends A {}
echo (new B)->who();
```
Верный ответ: b
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T06-L10 · OOP: classes and inheritance
What does this code output on PHP 8.5?
```php
class C
{
public int $x = 0 {
set { $this->x = $value * 2; }
}
}
$c = new C;
$c->x = 5;
echo $c->x;
```
Верный ответ: 10
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100.0%
100
T06-L1 · OOP: classes and inheritance
PHP supports constructor property promotion: public function __construct(private int $x) {}.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T06-L2 · OOP: classes and inheritance
Which keyword prevents a method from being overridden in subclasses?
Верный ответ: final
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T06-L3 · OOP: classes and inheritance
A method declared final cannot be overridden in a subclass.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T06-L4 · OOP: classes and inheritance
Parent properties with private visibility are accessible in a subclass.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T06-L5 · OOP: classes and inheritance
What does get_class(new class {}) return? Answer with the part of the name before the NUL byte (without the file path).
Верный ответ: class@anonymous
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T06-L6 · OOP: classes and inheritance
A private parent method is not part of the inheritance contract: a child may declare a method with the same name and any visibility.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T06-L7 · OOP: classes and inheritance
The magic method __get() is called only for non-existent properties.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T06-L8 · OOP: classes and inheritance
What does reassigning a readonly property throw — Exception or Error?
Верный ответ: error
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T06-L9 · OOP: classes and inheritance
What does this code output?
```php
class A
{
public function who(): string { return static::class; }
}
class B extends A {}
echo (new B)->who();
```
Верный ответ: b
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T06-L10 · OOP: classes and inheritance
What does this code output on PHP 8.5?
```php
class C
{
public int $x = 0 {
set { $this->x = $value * 2; }
}
}
$c = new C;
$c->x = 5;
echo $c->x;
```
Верный ответ: 10
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100.0%
Interfaces, traits, enum
100
T07-L1 · Interfaces, traits, enum
An interface can declare constants.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T07-L2 · Interfaces, traits, enum
Which operator checks whether an object is an instance of a class or interface?
Верный ответ: instanceof
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T07-L3 · Interfaces, traits, enum
An interface can declare static methods.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T07-L4 · Interfaces, traits, enum
The instanceof operator only checks class inheritance: it ignores interfaces.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T07-L5 · Interfaces, traits, enum
An interface method may have a default implementation, like a trait method.
Верный ответ: no
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T07-L6 · Interfaces, traits, enum
An abstract method in an abstract class may have protected visibility.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T07-L7 · Interfaces, traits, enum
How many elements will Foo::cases() return for enum Foo { case A; case B; case C; }?
Верный ответ: 3
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T07-L8 · Interfaces, traits, enum
A trait can declare constants.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T07-L9 · Interfaces, traits, enum
What does this code output?
```php
trait TA
{
public function f(): string { return 'A'; }
}
trait TB
{
public function f(): string { return 'B'; }
}
class TC
{
use TA, TB { TB::f insteadof TA; TA::f as g; }
}
echo (new TC)->f() . (new TC)->g();
```
Верный ответ: ba
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
40
T07-L10 · Interfaces, traits, enum
What does this code output?
```php
trait Counter
{
public static int $n = 0;
}
class CX { use Counter; }
class CY { use Counter; }
CX::$n = 1;
echo CY::$n;
```
Верный ответ: 0
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✗ · run-76: ✗
90.0%
100
T07-L1 · Interfaces, traits, enum
An interface can declare constants.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T07-L2 · Interfaces, traits, enum
Which operator checks whether an object is an instance of a class or interface?
Верный ответ: instanceof
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T07-L3 · Interfaces, traits, enum
An interface can declare static methods.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✗ · run-80: ✓ · run-81: ✓
100
T07-L4 · Interfaces, traits, enum
The instanceof operator only checks class inheritance: it ignores interfaces.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T07-L5 · Interfaces, traits, enum
An interface method may have a default implementation, like a trait method.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T07-L6 · Interfaces, traits, enum
An abstract method in an abstract class may have protected visibility.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T07-L7 · Interfaces, traits, enum
How many elements will Foo::cases() return for enum Foo { case A; case B; case C; }?
Верный ответ: 3
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T07-L8 · Interfaces, traits, enum
A trait can declare constants.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T07-L9 · Interfaces, traits, enum
What does this code output?
```php
trait TA
{
public function f(): string { return 'A'; }
}
trait TB
{
public function f(): string { return 'B'; }
}
class TC
{
use TA, TB { TB::f insteadof TA; TA::f as g; }
}
echo (new TC)->f() . (new TC)->g();
```
Верный ответ: ba
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T07-L10 · Interfaces, traits, enum
What does this code output?
```php
trait Counter
{
public static int $n = 0;
}
class CX { use Counter; }
class CY { use Counter; }
CX::$n = 1;
echo CY::$n;
```
Верный ответ: 0
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
98.0%
100
T07-L1 · Interfaces, traits, enum
An interface can declare constants.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T07-L2 · Interfaces, traits, enum
Which operator checks whether an object is an instance of a class or interface?
Верный ответ: instanceof
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T07-L3 · Interfaces, traits, enum
An interface can declare static methods.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T07-L4 · Interfaces, traits, enum
The instanceof operator only checks class inheritance: it ignores interfaces.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T07-L5 · Interfaces, traits, enum
An interface method may have a default implementation, like a trait method.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T07-L6 · Interfaces, traits, enum
An abstract method in an abstract class may have protected visibility.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T07-L7 · Interfaces, traits, enum
How many elements will Foo::cases() return for enum Foo { case A; case B; case C; }?
Верный ответ: 3
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T07-L8 · Interfaces, traits, enum
A trait can declare constants.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T07-L9 · Interfaces, traits, enum
What does this code output?
```php
trait TA
{
public function f(): string { return 'A'; }
}
trait TB
{
public function f(): string { return 'B'; }
}
class TC
{
use TA, TB { TB::f insteadof TA; TA::f as g; }
}
echo (new TC)->f() . (new TC)->g();
```
Верный ответ: ba
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T07-L10 · Interfaces, traits, enum
What does this code output?
```php
trait Counter
{
public static int $n = 0;
}
class CX { use Counter; }
class CY { use Counter; }
CX::$n = 1;
echo CY::$n;
```
Верный ответ: 0
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100.0%
Exceptions and errors
100
T08-L1 · Exceptions and errors
The Throwable interface is a common ancestor of both Exception and Error.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T08-L2 · Exceptions and errors
A catch (Exception $e) block will also catch TypeError, because TypeError ultimately inherits from Exception.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
100
T08-L3 · Exceptions and errors
The @ operator suppresses exceptions too.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T08-L4 · Exceptions and errors
What error class does intdiv(5, 0) throw?
Верный ответ: divisionbyzeroerror
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T08-L5 · Exceptions and errors
The finally block runs only if the exception was caught by a catch block.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T08-L6 · Exceptions and errors
An exception thrown inside a finally block has no effect on the result of the try block.
Верный ответ: no
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T08-L7 · Exceptions and errors
What does the expression (bool) new Exception('x') return?
Верный ответ: true
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T08-L8 · Exceptions and errors
Functions registered via register_shutdown_function() run when exit is called.
Верный ответ: yes
run-72: ✓ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
T08-L9 · Exceptions and errors
What does this code output?
```php
try {
try {
throw new RuntimeException('first');
} finally {
throw new LogicException('second');
}
} catch (LogicException $e) {
echo $e->getMessage();
}
```
Верный ответ: second
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T08-L10 · Exceptions and errors
What does this code output?
```php
function f(): int
{
try { return 1; } finally { return 2; }
}
echo f();
```
Верный ответ: 2
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
88.0%
100
T08-L1 · Exceptions and errors
The Throwable interface is a common ancestor of both Exception and Error.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T08-L2 · Exceptions and errors
A catch (Exception $e) block will also catch TypeError, because TypeError ultimately inherits from Exception.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T08-L3 · Exceptions and errors
The @ operator suppresses exceptions too.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T08-L4 · Exceptions and errors
What error class does intdiv(5, 0) throw?
Верный ответ: divisionbyzeroerror
run-77: ✗ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T08-L5 · Exceptions and errors
The finally block runs only if the exception was caught by a catch block.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T08-L6 · Exceptions and errors
An exception thrown inside a finally block has no effect on the result of the try block.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T08-L7 · Exceptions and errors
What does the expression (bool) new Exception('x') return?
Верный ответ: true
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T08-L8 · Exceptions and errors
Functions registered via register_shutdown_function() run when exit is called.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T08-L9 · Exceptions and errors
What does this code output?
```php
try {
try {
throw new RuntimeException('first');
} finally {
throw new LogicException('second');
}
} catch (LogicException $e) {
echo $e->getMessage();
}
```
Верный ответ: second
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T08-L10 · Exceptions and errors
What does this code output?
```php
function f(): int
{
try { return 1; } finally { return 2; }
}
echo f();
```
Верный ответ: 2
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
98.0%
100
T08-L1 · Exceptions and errors
The Throwable interface is a common ancestor of both Exception and Error.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T08-L2 · Exceptions and errors
A catch (Exception $e) block will also catch TypeError, because TypeError ultimately inherits from Exception.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T08-L3 · Exceptions and errors
The @ operator suppresses exceptions too.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T08-L4 · Exceptions and errors
What error class does intdiv(5, 0) throw?
Верный ответ: divisionbyzeroerror
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✗ · run-99: ✓
100
T08-L5 · Exceptions and errors
The finally block runs only if the exception was caught by a catch block.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T08-L6 · Exceptions and errors
An exception thrown inside a finally block has no effect on the result of the try block.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T08-L7 · Exceptions and errors
What does the expression (bool) new Exception('x') return?
Верный ответ: true
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T08-L8 · Exceptions and errors
Functions registered via register_shutdown_function() run when exit is called.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✗ · run-98: ✓ · run-99: ✓
100
T08-L9 · Exceptions and errors
What does this code output?
```php
try {
try {
throw new RuntimeException('first');
} finally {
throw new LogicException('second');
}
} catch (LogicException $e) {
echo $e->getMessage();
}
```
Верный ответ: second
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T08-L10 · Exceptions and errors
What does this code output?
```php
function f(): int
{
try { return 1; } finally { return 2; }
}
echo f();
```
Верный ответ: 2
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
96.0%
Namespaces and autoloading
100
T09-L1 · Namespaces and autoloading
The use App\Service\Mailer; statement itself loads the class file.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T09-L2 · Namespaces and autoloading
What follows use to import a function (not a class): the word function or const?
Верный ответ: function
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T09-L3 · Namespaces and autoloading
Into which file (path from src/) does the PSR-4 mapping "App\ → src/" place the class App\Controller\Api\UserController?
Верный ответ: src/controller/api/usercontroller.php
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T09-L4 · Namespaces and autoloading
Including vendor/autoload.php registers autoloaders via spl_autoload_register().
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T09-L5 · Namespaces and autoloading
The magic constant __NAMESPACE__ contains the name of the current namespace.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T09-L6 · Namespaces and autoloading
An unqualified class name (without a leading \) in new is resolved from the global root.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T09-L7 · Namespaces and autoloading
With the PSR-4 mapping "App\ → src/", the class App\Model\User lives in the file src/Model/User.php.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T09-L8 · Namespaces and autoloading
A use statement may be written inside a function body — the import then applies to that function only.
Верный ответ: no
run-72: ✗ · run-73: ✗ · run-74: ✓ · run-75: ✗ · run-76: ✗
40
T09-L9 · Namespaces and autoloading
What does this code output?
```php
namespace N;
use App\Foo as Baz;
echo Baz::class . '|' . \Baz::class;
```
Верный ответ: app\foo|baz
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✗ · run-76: ✗
100
T09-L10 · Namespaces and autoloading
What does this code output?
```php
namespace Ns;
class Foo {}
$c = 'Foo';
echo (class_exists($c) ? 'yes' : 'no')
. (class_exists(__NAMESPACE__ . '\\' . $c) ? 'yes' : 'no');
```
Верный ответ: noyes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
86.0%
100
T09-L1 · Namespaces and autoloading
The use App\Service\Mailer; statement itself loads the class file.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T09-L2 · Namespaces and autoloading
What follows use to import a function (not a class): the word function or const?
Верный ответ: function
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T09-L3 · Namespaces and autoloading
Into which file (path from src/) does the PSR-4 mapping "App\ → src/" place the class App\Controller\Api\UserController?
Верный ответ: src/controller/api/usercontroller.php
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T09-L4 · Namespaces and autoloading
Including vendor/autoload.php registers autoloaders via spl_autoload_register().
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T09-L5 · Namespaces and autoloading
The magic constant __NAMESPACE__ contains the name of the current namespace.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T09-L6 · Namespaces and autoloading
An unqualified class name (without a leading \) in new is resolved from the global root.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T09-L7 · Namespaces and autoloading
With the PSR-4 mapping "App\ → src/", the class App\Model\User lives in the file src/Model/User.php.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
20
T09-L8 · Namespaces and autoloading
A use statement may be written inside a function body — the import then applies to that function only.
Верный ответ: no
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✓ · run-81: ✗
100
T09-L9 · Namespaces and autoloading
What does this code output?
```php
namespace N;
use App\Foo as Baz;
echo Baz::class . '|' . \Baz::class;
```
Верный ответ: app\foo|baz
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T09-L10 · Namespaces and autoloading
What does this code output?
```php
namespace Ns;
class Foo {}
$c = 'Foo';
echo (class_exists($c) ? 'yes' : 'no')
. (class_exists(__NAMESPACE__ . '\\' . $c) ? 'yes' : 'no');
```
Верный ответ: noyes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
92.0%
100
T09-L1 · Namespaces and autoloading
The use App\Service\Mailer; statement itself loads the class file.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T09-L2 · Namespaces and autoloading
What follows use to import a function (not a class): the word function or const?
Верный ответ: function
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T09-L3 · Namespaces and autoloading
Into which file (path from src/) does the PSR-4 mapping "App\ → src/" place the class App\Controller\Api\UserController?
Верный ответ: src/controller/api/usercontroller.php
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T09-L4 · Namespaces and autoloading
Including vendor/autoload.php registers autoloaders via spl_autoload_register().
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T09-L5 · Namespaces and autoloading
The magic constant __NAMESPACE__ contains the name of the current namespace.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T09-L6 · Namespaces and autoloading
An unqualified class name (without a leading \) in new is resolved from the global root.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T09-L7 · Namespaces and autoloading
With the PSR-4 mapping "App\ → src/", the class App\Model\User lives in the file src/Model/User.php.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
0
T09-L8 · Namespaces and autoloading
A use statement may be written inside a function body — the import then applies to that function only.
Верный ответ: no
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
100
T09-L9 · Namespaces and autoloading
What does this code output?
```php
namespace N;
use App\Foo as Baz;
echo Baz::class . '|' . \Baz::class;
```
Верный ответ: app\foo|baz
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T09-L10 · Namespaces and autoloading
What does this code output?
```php
namespace Ns;
class Foo {}
$c = 'Foo';
echo (class_exists($c) ? 'yes' : 'no')
. (class_exists(__NAMESPACE__ . '\\' . $c) ? 'yes' : 'no');
```
Верный ответ: noyes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
90.0%
References and scope
100
T10-L1 · References and scope
Arrays are copied on assignment rather than passed by reference.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T10-L2 · References and scope
What will this print: $a = [1, 2]; $b = $a; $b[] = 3; echo count($a);
Верный ответ: 2
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T10-L3 · References and scope
Inside a function, user-defined global variables are inaccessible without global, $GLOBALS, or passing them as parameters.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
100
T10-L4 · References and scope
unset($GLOBALS['x']) inside a function removes the global variable only for that function.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T10-L5 · References and scope
What will this print: function inc(&$x) { $x++; } $n = 5; inc($n); echo $n;
Верный ответ: 6
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
T10-L6 · References and scope
A foreach over an array (by value) works with the "live" array: changes to the array inside the loop are visible in the same pass.
Верный ответ: no
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T10-L7 · References and scope
A static property belongs to each instance separately: changes in one object are not visible in others.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T10-L8 · References and scope
An array can have a boolean key true, and it will be stored as bool.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T10-L9 · References and scope
What does this code output?
```php
$a = [1, 2, 3];
foreach ($a as &$v) {}
$v = 99;
echo implode(',', $a);
```
Верный ответ: 1,2,99
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
40
T10-L10 · References and scope
What does this code output?
```php
class A
{
public function inc(): int
{
static $n = 0;
return ++$n;
}
}
class B extends A {}
$a = new A;
$b = new B;
$a->inc();
$b->inc();
echo $a->inc();
```
Верный ответ: 3
run-72: ✓ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✓
86.0%
100
T10-L1 · References and scope
Arrays are copied on assignment rather than passed by reference.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T10-L2 · References and scope
What will this print: $a = [1, 2]; $b = $a; $b[] = 3; echo count($a);
Верный ответ: 2
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T10-L3 · References and scope
Inside a function, user-defined global variables are inaccessible without global, $GLOBALS, or passing them as parameters.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T10-L4 · References and scope
unset($GLOBALS['x']) inside a function removes the global variable only for that function.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T10-L5 · References and scope
What will this print: function inc(&$x) { $x++; } $n = 5; inc($n); echo $n;
Верный ответ: 6
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T10-L6 · References and scope
A foreach over an array (by value) works with the "live" array: changes to the array inside the loop are visible in the same pass.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T10-L7 · References and scope
A static property belongs to each instance separately: changes in one object are not visible in others.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T10-L8 · References and scope
An array can have a boolean key true, and it will be stored as bool.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T10-L9 · References and scope
What does this code output?
```php
$a = [1, 2, 3];
foreach ($a as &$v) {}
$v = 99;
echo implode(',', $a);
```
Верный ответ: 1,2,99
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T10-L10 · References and scope
What does this code output?
```php
class A
{
public function inc(): int
{
static $n = 0;
return ++$n;
}
}
class B extends A {}
$a = new A;
$b = new B;
$a->inc();
$b->inc();
echo $a->inc();
```
Верный ответ: 3
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100.0%
100
T10-L1 · References and scope
Arrays are copied on assignment rather than passed by reference.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T10-L2 · References and scope
What will this print: $a = [1, 2]; $b = $a; $b[] = 3; echo count($a);
Верный ответ: 2
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T10-L3 · References and scope
Inside a function, user-defined global variables are inaccessible without global, $GLOBALS, or passing them as parameters.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T10-L4 · References and scope
unset($GLOBALS['x']) inside a function removes the global variable only for that function.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T10-L5 · References and scope
What will this print: function inc(&$x) { $x++; } $n = 5; inc($n); echo $n;
Верный ответ: 6
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
60
T10-L6 · References and scope
A foreach over an array (by value) works with the "live" array: changes to the array inside the loop are visible in the same pass.
Верный ответ: no
run-100: ✓ · run-101: ✗ · run-97: ✗ · run-98: ✓ · run-99: ✓
100
T10-L7 · References and scope
A static property belongs to each instance separately: changes in one object are not visible in others.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T10-L8 · References and scope
An array can have a boolean key true, and it will be stored as bool.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T10-L9 · References and scope
What does this code output?
```php
$a = [1, 2, 3];
foreach ($a as &$v) {}
$v = 99;
echo implode(',', $a);
```
Верный ответ: 1,2,99
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T10-L10 · References and scope
What does this code output?
```php
class A
{
public function inc(): int
{
static $n = 0;
return ++$n;
}
}
class B extends A {}
$a = new A;
$b = new B;
$a->inc();
$b->inc();
echo $a->inc();
```
Верный ответ: 3
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
96.0%
Generators, iterators, SPL
100
T11-L1 · Generators, iterators, SPL
Inside a generator, return with a value can be used, and it becomes available via $gen->getReturn().
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
T11-L2 · Generators, iterators, SPL
A fully consumed generator can be rewound with rewind() and traversed again.
Верный ответ: no
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T11-L3 · Generators, iterators, SPL
The yield from construct delegates traversal to another generator or iterable.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T11-L4 · Generators, iterators, SPL
What does get_class(g()) return for function g() { yield 1; }?
Верный ответ: generator
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T11-L5 · Generators, iterators, SPL
How many elements will count(iterator_to_array((function () { yield from [1, 2, 3]; })())) return?
Верный ответ: 3
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T11-L6 · Generators, iterators, SPL
The SplStack class implements a FIFO queue.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T11-L7 · Generators, iterators, SPL
ArrayIterator allows wrapping an array and traversing it via the Iterator interface.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T11-L8 · Generators, iterators, SPL
An ArrayObject instance cannot be traversed with foreach.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T11-L9 · Generators, iterators, SPL
What does this code output?
```php
function g(): Generator
{
$x = yield 1;
return $x + 1;
}
$g = g();
$g->send(10);
echo $g->getReturn();
```
Верный ответ: 11
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
0
T11-L10 · Generators, iterators, SPL
What does this code output?
```php
function inner(): Generator
{
yield 1;
yield 2;
return 'ok';
}
function outer(): Generator
{
$r = yield from inner();
yield $r;
}
echo implode(',', iterator_to_array(outer()));
```
Верный ответ: ok,2
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
84.0%
100
T11-L1 · Generators, iterators, SPL
Inside a generator, return with a value can be used, and it becomes available via $gen->getReturn().
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T11-L2 · Generators, iterators, SPL
A fully consumed generator can be rewound with rewind() and traversed again.
Верный ответ: no
run-77: ✗ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
20
T11-L3 · Generators, iterators, SPL
The yield from construct delegates traversal to another generator or iterable.
Верный ответ: yes
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✓
100
T11-L4 · Generators, iterators, SPL
What does get_class(g()) return for function g() { yield 1; }?
Верный ответ: generator
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T11-L5 · Generators, iterators, SPL
How many elements will count(iterator_to_array((function () { yield from [1, 2, 3]; })())) return?
Верный ответ: 3
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T11-L6 · Generators, iterators, SPL
The SplStack class implements a FIFO queue.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T11-L7 · Generators, iterators, SPL
ArrayIterator allows wrapping an array and traversing it via the Iterator interface.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T11-L8 · Generators, iterators, SPL
An ArrayObject instance cannot be traversed with foreach.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
20
T11-L9 · Generators, iterators, SPL
What does this code output?
```php
function g(): Generator
{
$x = yield 1;
return $x + 1;
}
$g = g();
$g->send(10);
echo $g->getReturn();
```
Верный ответ: 11
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✓ · run-81: ✗
0
T11-L10 · Generators, iterators, SPL
What does this code output?
```php
function inner(): Generator
{
yield 1;
yield 2;
return 'ok';
}
function outer(): Generator
{
$r = yield from inner();
yield $r;
}
echo implode(',', iterator_to_array(outer()));
```
Верный ответ: ok,2
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
72.0%
100
T11-L1 · Generators, iterators, SPL
Inside a generator, return with a value can be used, and it becomes available via $gen->getReturn().
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T11-L2 · Generators, iterators, SPL
A fully consumed generator can be rewound with rewind() and traversed again.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T11-L3 · Generators, iterators, SPL
The yield from construct delegates traversal to another generator or iterable.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T11-L4 · Generators, iterators, SPL
What does get_class(g()) return for function g() { yield 1; }?
Верный ответ: generator
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T11-L5 · Generators, iterators, SPL
How many elements will count(iterator_to_array((function () { yield from [1, 2, 3]; })())) return?
Верный ответ: 3
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T11-L6 · Generators, iterators, SPL
The SplStack class implements a FIFO queue.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T11-L7 · Generators, iterators, SPL
ArrayIterator allows wrapping an array and traversing it via the Iterator interface.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T11-L8 · Generators, iterators, SPL
An ArrayObject instance cannot be traversed with foreach.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T11-L9 · Generators, iterators, SPL
What does this code output?
```php
function g(): Generator
{
$x = yield 1;
return $x + 1;
}
$g = g();
$g->send(10);
echo $g->getReturn();
```
Верный ответ: 11
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
0
T11-L10 · Generators, iterators, SPL
What does this code output?
```php
function inner(): Generator
{
yield 1;
yield 2;
return 'ok';
}
function outer(): Generator
{
$r = yield from inner();
yield $r;
}
echo implode(',', iterator_to_array(outer()));
```
Верный ответ: ok,2
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
90.0%
Configuration and security
100
T12-L1 · Configuration and security
password_hash() generates a salt automatically — passing one separately is not needed.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T12-L2 · Configuration and security
In PHP 8, PASSWORD_DEFAULT is md5 with an automatically added salt.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T12-L3 · Configuration and security
What does password_verify('secret', password_hash('secret', PASSWORD_DEFAULT)) return?
Верный ответ: true
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T12-L4 · Configuration and security
strip_tags() protects against SQL injection.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T12-L5 · Configuration and security
session_regenerate_id() is used to protect against session fixation upon user login.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T12-L6 · Configuration and security
Which built-in function returns the SAPI name (e.g., cli)?
Верный ответ: php_sapi_name
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ⬜ · run-76: ✓
100
T12-L7 · Configuration and security
session_destroy() deletes session data on the server but not the cookie in the user's browser.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T12-L8 · Configuration and security
Without calling session_start(), the $_SESSION array is automatically populated with session data.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T12-L9 · Configuration and security
What does this code output?
```php
$hash = password_hash('x', PASSWORD_BCRYPT, ['cost' => 4]);
echo password_needs_rehash($hash, PASSWORD_BCRYPT, ['cost' => 4]) ? 'yes' : 'no';
echo password_needs_rehash($hash, PASSWORD_BCRYPT, ['cost' => 5]) ? 'yes' : 'no';
```
Верный ответ: noyes
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
20
T12-L10 · Configuration and security
What does this code output on PHP 8.5?
```php
echo (E_ALL & 2048) === 0 ? 'strict-out' : 'strict-in';
```
Верный ответ: strict-out
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✗
88.0%
100
T12-L1 · Configuration and security
password_hash() generates a salt automatically — passing one separately is not needed.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T12-L2 · Configuration and security
In PHP 8, PASSWORD_DEFAULT is md5 with an automatically added salt.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T12-L3 · Configuration and security
What does password_verify('secret', password_hash('secret', PASSWORD_DEFAULT)) return?
Верный ответ: true
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T12-L4 · Configuration and security
strip_tags() protects against SQL injection.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T12-L5 · Configuration and security
session_regenerate_id() is used to protect against session fixation upon user login.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T12-L6 · Configuration and security
Which built-in function returns the SAPI name (e.g., cli)?
Верный ответ: php_sapi_name
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T12-L7 · Configuration and security
session_destroy() deletes session data on the server but not the cookie in the user's browser.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T12-L8 · Configuration and security
Without calling session_start(), the $_SESSION array is automatically populated with session data.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T12-L9 · Configuration and security
What does this code output?
```php
$hash = password_hash('x', PASSWORD_BCRYPT, ['cost' => 4]);
echo password_needs_rehash($hash, PASSWORD_BCRYPT, ['cost' => 4]) ? 'yes' : 'no';
echo password_needs_rehash($hash, PASSWORD_BCRYPT, ['cost' => 5]) ? 'yes' : 'no';
```
Верный ответ: noyes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T12-L10 · Configuration and security
What does this code output on PHP 8.5?
```php
echo (E_ALL & 2048) === 0 ? 'strict-out' : 'strict-in';
```
Верный ответ: strict-out
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✗
98.0%
100
T12-L1 · Configuration and security
password_hash() generates a salt automatically — passing one separately is not needed.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T12-L2 · Configuration and security
In PHP 8, PASSWORD_DEFAULT is md5 with an automatically added salt.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T12-L3 · Configuration and security
What does password_verify('secret', password_hash('secret', PASSWORD_DEFAULT)) return?
Верный ответ: true
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T12-L4 · Configuration and security
strip_tags() protects against SQL injection.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T12-L5 · Configuration and security
session_regenerate_id() is used to protect against session fixation upon user login.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T12-L6 · Configuration and security
Which built-in function returns the SAPI name (e.g., cli)?
Верный ответ: php_sapi_name
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T12-L7 · Configuration and security
session_destroy() deletes session data on the server but not the cookie in the user's browser.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T12-L8 · Configuration and security
Without calling session_start(), the $_SESSION array is automatically populated with session data.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T12-L9 · Configuration and security
What does this code output?
```php
$hash = password_hash('x', PASSWORD_BCRYPT, ['cost' => 4]);
echo password_needs_rehash($hash, PASSWORD_BCRYPT, ['cost' => 4]) ? 'yes' : 'no';
echo password_needs_rehash($hash, PASSWORD_BCRYPT, ['cost' => 5]) ? 'yes' : 'no';
```
Верный ответ: noyes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
40
T12-L10 · Configuration and security
What does this code output on PHP 8.5?
```php
echo (E_ALL & 2048) === 0 ? 'strict-out' : 'strict-in';
```
Верный ответ: strict-out
run-100: ✗ · run-101: ✗ · run-97: ✓ · run-98: ✓ · run-99: ✗
94.0%
PHP 8.4–8.5
0
VC-L1 · PHP 8.4–8.5
In which PHP version was the array_find() function introduced?
Верный ответ: 8.4
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
VC-L2 · PHP 8.4–8.5
Property hooks (get/set right in the property declaration) landed in PHP 8.4.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
VC-L3 · PHP 8.4–8.5
Asymmetric visibility (public private(set) string $name) appeared in PHP 8.4.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✗
0
VC-L4 · PHP 8.4–8.5
In which PHP version was the #[\NoDiscard] attribute introduced? Answer with the version number.
Верный ответ: 8.5
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
0
VC-L5 · PHP 8.4–8.5
In which PHP version did the pipe operator |> first appear? Answer with the version number.
Верный ответ: 8.5
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
0
VC-L6 · PHP 8.4–8.5
In which PHP version did clone-with — the syntax clone($obj, ['x' => 1]) — appear? Answer with the version number.
Верный ответ: 8.5
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
0
VC-L7 · PHP 8.4–8.5
In which PHP version were the array_first() and array_last() functions introduced?
Верный ответ: 8.5
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
0
VC-L8 · PHP 8.4–8.5
For which PHP version was RFC Partial Function Application v2 adopted (as of 2026-11-07)? Answer with the version number.
Верный ответ: 8.6
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
VC-L9 · PHP 8.4–8.5
What does this code output on PHP 8.5?
```php
class C
{
public function hi(): string { return 'hi'; }
}
echo new C()->hi();
```
Верный ответ: hi
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
VC-L10 · PHP 8.4–8.5
What does this code output on PHP 8.5?
```php
class Heavy
{
public int $v = 0;
}
$r = new ReflectionClass(Heavy::class);
$o = $r->newLazyGhost(function (Heavy $obj) {
$obj->v = 21;
});
echo $r->isUninitializedLazyObject($o) ? 'yes' : 'no';
$o->v;
echo $r->isUninitializedLazyObject($o) ? 'yes' : 'no';
```
Верный ответ: yesno
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
34.0%
60
VC-L1 · PHP 8.4–8.5
In which PHP version was the array_find() function introduced?
Верный ответ: 8.4
run-77: ✗ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✗
100
VC-L2 · PHP 8.4–8.5
Property hooks (get/set right in the property declaration) landed in PHP 8.4.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
VC-L3 · PHP 8.4–8.5
Asymmetric visibility (public private(set) string $name) appeared in PHP 8.4.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
0
VC-L4 · PHP 8.4–8.5
In which PHP version was the #[\NoDiscard] attribute introduced? Answer with the version number.
Верный ответ: 8.5
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
0
VC-L5 · PHP 8.4–8.5
In which PHP version did the pipe operator |> first appear? Answer with the version number.
Верный ответ: 8.5
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
0
VC-L6 · PHP 8.4–8.5
In which PHP version did clone-with — the syntax clone($obj, ['x' => 1]) — appear? Answer with the version number.
Верный ответ: 8.5
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
0
VC-L7 · PHP 8.4–8.5
In which PHP version were the array_first() and array_last() functions introduced?
Верный ответ: 8.5
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
0
VC-L8 · PHP 8.4–8.5
For which PHP version was RFC Partial Function Application v2 adopted (as of 2026-11-07)? Answer with the version number.
Верный ответ: 8.6
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
100
VC-L9 · PHP 8.4–8.5
What does this code output on PHP 8.5?
```php
class C
{
public function hi(): string { return 'hi'; }
}
echo new C()->hi();
```
Верный ответ: hi
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
VC-L10 · PHP 8.4–8.5
What does this code output on PHP 8.5?
```php
class Heavy
{
public int $v = 0;
}
$r = new ReflectionClass(Heavy::class);
$o = $r->newLazyGhost(function (Heavy $obj) {
$obj->v = 21;
});
echo $r->isUninitializedLazyObject($o) ? 'yes' : 'no';
$o->v;
echo $r->isUninitializedLazyObject($o) ? 'yes' : 'no';
```
Верный ответ: yesno
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
46.0%
20
VC-L1 · PHP 8.4–8.5
In which PHP version was the array_find() function introduced?
Верный ответ: 8.4
run-100: ✓ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
100
VC-L2 · PHP 8.4–8.5
Property hooks (get/set right in the property declaration) landed in PHP 8.4.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
VC-L3 · PHP 8.4–8.5
Asymmetric visibility (public private(set) string $name) appeared in PHP 8.4.
Верный ответ: yes
run-100: ✗ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
0
VC-L4 · PHP 8.4–8.5
In which PHP version was the #[\NoDiscard] attribute introduced? Answer with the version number.
Верный ответ: 8.5
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
0
VC-L5 · PHP 8.4–8.5
In which PHP version did the pipe operator |> first appear? Answer with the version number.
Верный ответ: 8.5
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
0
VC-L6 · PHP 8.4–8.5
In which PHP version did clone-with — the syntax clone($obj, ['x' => 1]) — appear? Answer with the version number.
Верный ответ: 8.5
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
0
VC-L7 · PHP 8.4–8.5
In which PHP version were the array_first() and array_last() functions introduced?
Верный ответ: 8.5
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
0
VC-L8 · PHP 8.4–8.5
For which PHP version was RFC Partial Function Application v2 adopted (as of 2026-11-07)? Answer with the version number.
Верный ответ: 8.6
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
100
VC-L9 · PHP 8.4–8.5
What does this code output on PHP 8.5?
```php
class C
{
public function hi(): string { return 'hi'; }
}
echo new C()->hi();
```
Верный ответ: hi
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
VC-L10 · PHP 8.4–8.5
What does this code output on PHP 8.5?
```php
class Heavy
{
public int $v = 0;
}
$r = new ReflectionClass(Heavy::class);
$o = $r->newLazyGhost(function (Heavy $obj) {
$obj->v = 21;
});
echo $r->isUninitializedLazyObject($o) ? 'yes' : 'no';
$o->v;
echo $r->isUninitializedLazyObject($o) ? 'yes' : 'no';
```
Верный ответ: yesno
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
40.0%
PHP: 8.6+ and the future
0
VF-L1 · PHP: 8.6+ and the future
For which PHP version was the RFC clamp_v2 (the clamp() function) implemented, as of 2026-11-07? Answer with the version number.
Верный ответ: 8.6
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
80
VF-L2 · PHP: 8.6+ and the future
RFC Context Managers v2 has already been adopted in PHP (as of 2026-11-07).
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
60
VF-L3 · PHP: 8.6+ and the future
RFC Bound-Erased Generic Types (generics) was declined in 2026.
Верный ответ: yes
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
VF-L4 · PHP: 8.6+ and the future
As of 2026-11-07, the RFC enabling multithreading (ZTS) by default has already been accepted in PHP.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
VF-L5 · PHP: 8.6+ and the future
As of PHP 8.5, generics (parameterized types) are still absent.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
VF-L6 · PHP: 8.6+ and the future
As of 2026-11-07, the latest stable PHP version is 8.5, and PHP 8.6 has not been released yet (GA — 2026-11-19).
Верный ответ: yes
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
100
VF-L7 · PHP: 8.6+ and the future
The PHP 6 branch never shipped: after PHP 5.6 came PHP 7.0 directly.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
VF-L8 · PHP: 8.6+ and the future
The RFC adding the #[\Deprecated] attribute to the core was adopted.
Верный ответ: yes
run-72: ✓ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✓
70.0%
0
VF-L1 · PHP: 8.6+ and the future
For which PHP version was the RFC clamp_v2 (the clamp() function) implemented, as of 2026-11-07? Answer with the version number.
Верный ответ: 8.6
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
80
VF-L2 · PHP: 8.6+ and the future
RFC Context Managers v2 has already been adopted in PHP (as of 2026-11-07).
Верный ответ: no
run-77: ✗ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
20
VF-L3 · PHP: 8.6+ and the future
RFC Bound-Erased Generic Types (generics) was declined in 2026.
Верный ответ: yes
run-77: ✗ · run-78: ✓ · run-79: ✗ · run-80: ✗ · run-81: ✗
60
VF-L4 · PHP: 8.6+ and the future
As of 2026-11-07, the RFC enabling multithreading (ZTS) by default has already been accepted in PHP.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✗ · run-81: ✗
100
VF-L5 · PHP: 8.6+ and the future
As of PHP 8.5, generics (parameterized types) are still absent.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
VF-L6 · PHP: 8.6+ and the future
As of 2026-11-07, the latest stable PHP version is 8.5, and PHP 8.6 has not been released yet (GA — 2026-11-19).
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
VF-L7 · PHP: 8.6+ and the future
The PHP 6 branch never shipped: after PHP 5.6 came PHP 7.0 directly.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
0
VF-L8 · PHP: 8.6+ and the future
The RFC adding the #[\Deprecated] attribute to the core was adopted.
Верный ответ: yes
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
57.5%
0
VF-L1 · PHP: 8.6+ and the future
For which PHP version was the RFC clamp_v2 (the clamp() function) implemented, as of 2026-11-07? Answer with the version number.
Верный ответ: 8.6
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
80
VF-L2 · PHP: 8.6+ and the future
RFC Context Managers v2 has already been adopted in PHP (as of 2026-11-07).
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✗ · run-98: ✓ · run-99: ✓
100
VF-L3 · PHP: 8.6+ and the future
RFC Bound-Erased Generic Types (generics) was declined in 2026.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
VF-L4 · PHP: 8.6+ and the future
As of 2026-11-07, the RFC enabling multithreading (ZTS) by default has already been accepted in PHP.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✗
100
VF-L5 · PHP: 8.6+ and the future
As of PHP 8.5, generics (parameterized types) are still absent.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
VF-L6 · PHP: 8.6+ and the future
As of 2026-11-07, the latest stable PHP version is 8.5, and PHP 8.6 has not been released yet (GA — 2026-11-19).
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
VF-L7 · PHP: 8.6+ and the future
The PHP 6 branch never shipped: after PHP 5.6 came PHP 7.0 directly.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
0
VF-L8 · PHP: 8.6+ and the future
The RFC adding the #[\Deprecated] attribute to the core was adopted.
Верный ответ: yes
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
70.0%
Clean architecture
100
T25-L1 · Clean architecture
The dependency rule of clean and onion architecture: inner layers know nothing about outer ones — dependencies point toward the center.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T25-L2 · Clean architecture
Domain entities import neither Doctrine nor Symfony — only the language and, possibly, the standard library.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T25-L3 · Clean architecture
Controllers and Twig templates belong to the business-logic layer because they are the ones calling use cases.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
0
T25-L4 · Clean architecture
What sits at the very center of the onion architecture?
Верный ответ: domain model
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
T25-L5 · Clean architecture
Layer boundary violations can be caught automatically: a layer-dependency analyzer (e.g. deptrac) fails on a forbidden call.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T25-L6 · Clean architecture
A use case (interactor) may accept an HTTP request or an EntityManager as arguments — it is simpler that way.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
100
T25-L7 · Clean architecture
What is the component called that provides a collection of aggregates/entities while hiding the storage mechanism behind an interface?
Верный ответ: repository
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T25-L8 · Clean architecture
In clean architecture, swapping PostgreSQL for another database touches only the outer layer — the domain and use cases stay unchanged.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T25-L9 · Clean architecture
Layers: Domain, Application, Infrastructure. Deptrac rules: Application → Domain; Infrastructure → Domain, Application; Domain → Domain only.
How many violations will deptrac report for this class?
```php
namespace App\Domain;
use App\Application\PlaceOrder;
use App\Infrastructure\Db;
class OrderService
{
public function __construct(
private PlaceOrder $handler,
private Db $db,
) {}
}
```
Верный ответ: 2
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T25-L10 · Clean architecture
Layers: Domain, Application, Infrastructure. Deptrac rules: Application → Domain; Infrastructure → Domain, Application; Domain → Domain only.
How many violations will deptrac report for this class?
```php
namespace App\Domain;
use App\Application\PlaceOrder;
use App\Infrastructure\Db;
class BillingService
{
public function __construct(
private PlaceOrder $handler,
private Db $db,
private \App\Infrastructure\Logger $logger,
) {}
}
```
Верный ответ: 3
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
86.0%
100
T25-L1 · Clean architecture
The dependency rule of clean and onion architecture: inner layers know nothing about outer ones — dependencies point toward the center.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T25-L2 · Clean architecture
Domain entities import neither Doctrine nor Symfony — only the language and, possibly, the standard library.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T25-L3 · Clean architecture
Controllers and Twig templates belong to the business-logic layer because they are the ones calling use cases.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
0
T25-L4 · Clean architecture
What sits at the very center of the onion architecture?
Верный ответ: domain model
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
100
T25-L5 · Clean architecture
Layer boundary violations can be caught automatically: a layer-dependency analyzer (e.g. deptrac) fails on a forbidden call.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T25-L6 · Clean architecture
A use case (interactor) may accept an HTTP request or an EntityManager as arguments — it is simpler that way.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T25-L7 · Clean architecture
What is the component called that provides a collection of aggregates/entities while hiding the storage mechanism behind an interface?
Верный ответ: repository
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T25-L8 · Clean architecture
In clean architecture, swapping PostgreSQL for another database touches only the outer layer — the domain and use cases stay unchanged.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T25-L9 · Clean architecture
Layers: Domain, Application, Infrastructure. Deptrac rules: Application → Domain; Infrastructure → Domain, Application; Domain → Domain only.
How many violations will deptrac report for this class?
```php
namespace App\Domain;
use App\Application\PlaceOrder;
use App\Infrastructure\Db;
class OrderService
{
public function __construct(
private PlaceOrder $handler,
private Db $db,
) {}
}
```
Верный ответ: 2
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T25-L10 · Clean architecture
Layers: Domain, Application, Infrastructure. Deptrac rules: Application → Domain; Infrastructure → Domain, Application; Domain → Domain only.
How many violations will deptrac report for this class?
```php
namespace App\Domain;
use App\Application\PlaceOrder;
use App\Infrastructure\Db;
class BillingService
{
public function __construct(
private PlaceOrder $handler,
private Db $db,
private \App\Infrastructure\Logger $logger,
) {}
}
```
Верный ответ: 3
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
90.0%
100
T25-L1 · Clean architecture
The dependency rule of clean and onion architecture: inner layers know nothing about outer ones — dependencies point toward the center.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T25-L2 · Clean architecture
Domain entities import neither Doctrine nor Symfony — only the language and, possibly, the standard library.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T25-L3 · Clean architecture
Controllers and Twig templates belong to the business-logic layer because they are the ones calling use cases.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
0
T25-L4 · Clean architecture
What sits at the very center of the onion architecture?
Верный ответ: domain model
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
100
T25-L5 · Clean architecture
Layer boundary violations can be caught automatically: a layer-dependency analyzer (e.g. deptrac) fails on a forbidden call.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T25-L6 · Clean architecture
A use case (interactor) may accept an HTTP request or an EntityManager as arguments — it is simpler that way.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T25-L7 · Clean architecture
What is the component called that provides a collection of aggregates/entities while hiding the storage mechanism behind an interface?
Верный ответ: repository
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T25-L8 · Clean architecture
In clean architecture, swapping PostgreSQL for another database touches only the outer layer — the domain and use cases stay unchanged.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T25-L9 · Clean architecture
Layers: Domain, Application, Infrastructure. Deptrac rules: Application → Domain; Infrastructure → Domain, Application; Domain → Domain only.
How many violations will deptrac report for this class?
```php
namespace App\Domain;
use App\Application\PlaceOrder;
use App\Infrastructure\Db;
class OrderService
{
public function __construct(
private PlaceOrder $handler,
private Db $db,
) {}
}
```
Верный ответ: 2
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T25-L10 · Clean architecture
Layers: Domain, Application, Infrastructure. Deptrac rules: Application → Domain; Infrastructure → Domain, Application; Domain → Domain only.
How many violations will deptrac report for this class?
```php
namespace App\Domain;
use App\Application\PlaceOrder;
use App\Infrastructure\Db;
class BillingService
{
public function __construct(
private PlaceOrder $handler,
private Db $db,
private \App\Infrastructure\Logger $logger,
) {}
}
```
Верный ответ: 3
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
90.0%
DDD
100
T26-L1 · DDD
In DDD, an aggregate is just another name for a database table.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T26-L2 · DDD
A Value Object is immutable and compared by the values of its fields, not by identity.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T26-L3 · DDD
What is the single external entry point of an aggregate, through which all changes must go, called?
Верный ответ: aggregate root
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✗
100
T26-L4 · DDD
In DDD, a repository is declared for an aggregate (its root), not for every entity.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T26-L5 · DDD
Ubiquitous language is the model's shared language common to developers and domain experts.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
0
T26-L6 · DDD
What is the boundary called within which a model and its language are consistent, while outside the same words mean other models?
Верный ответ: bounded context
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
T26-L7 · DDD
An anemic model (objects with only getters/setters, logic in services) is the recommended DDD style.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T26-L8 · DDD
Bounded context means each context has its own model: the same concept in different contexts is a different class.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T26-L9 · DDD
What does this code output?
```php
final class Order
{
private array $items = [];
public function add(string $sku): void
{
$this->items[$sku] = true;
}
public function count(): int
{
return count($this->items);
}
public function remove(string $sku): void
{
if (count($this->items) === 1) {
throw new DomainException('last item');
}
unset($this->items[$sku]);
}
}
$o = new Order;
$o->add('a');
try {
$o->remove('a');
} catch (DomainException) {
}
echo $o->count();
```
Верный ответ: 1
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T26-L10 · DDD
What does this code output?
```php
final class Money
{
public function __construct(public readonly int $amount) {}
public function add(Money $o): Money
{
return new self($this->amount + $o->amount);
}
}
$a = new Money(10);
$c = $a->add(new Money(5));
echo $a->amount . ',' . $c->amount;
```
Верный ответ: 10,15
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
82.0%
100
T26-L1 · DDD
In DDD, an aggregate is just another name for a database table.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T26-L2 · DDD
A Value Object is immutable and compared by the values of its fields, not by identity.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T26-L3 · DDD
What is the single external entry point of an aggregate, through which all changes must go, called?
Верный ответ: aggregate root
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T26-L4 · DDD
In DDD, a repository is declared for an aggregate (its root), not for every entity.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T26-L5 · DDD
Ubiquitous language is the model's shared language common to developers and domain experts.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
20
T26-L6 · DDD
What is the boundary called within which a model and its language are consistent, while outside the same words mean other models?
Верный ответ: bounded context
run-77: ✗ · run-78: ✓ · run-79: ✗ · run-80: ✗ · run-81: ✗
100
T26-L7 · DDD
An anemic model (objects with only getters/setters, logic in services) is the recommended DDD style.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T26-L8 · DDD
Bounded context means each context has its own model: the same concept in different contexts is a different class.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T26-L9 · DDD
What does this code output?
```php
final class Order
{
private array $items = [];
public function add(string $sku): void
{
$this->items[$sku] = true;
}
public function count(): int
{
return count($this->items);
}
public function remove(string $sku): void
{
if (count($this->items) === 1) {
throw new DomainException('last item');
}
unset($this->items[$sku]);
}
}
$o = new Order;
$o->add('a');
try {
$o->remove('a');
} catch (DomainException) {
}
echo $o->count();
```
Верный ответ: 1
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T26-L10 · DDD
What does this code output?
```php
final class Money
{
public function __construct(public readonly int $amount) {}
public function add(Money $o): Money
{
return new self($this->amount + $o->amount);
}
}
$a = new Money(10);
$c = $a->add(new Money(5));
echo $a->amount . ',' . $c->amount;
```
Верный ответ: 10,15
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
92.0%
100
T26-L1 · DDD
In DDD, an aggregate is just another name for a database table.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T26-L2 · DDD
A Value Object is immutable and compared by the values of its fields, not by identity.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T26-L3 · DDD
What is the single external entry point of an aggregate, through which all changes must go, called?
Верный ответ: aggregate root
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✗ · run-99: ✓
100
T26-L4 · DDD
In DDD, a repository is declared for an aggregate (its root), not for every entity.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T26-L5 · DDD
Ubiquitous language is the model's shared language common to developers and domain experts.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
0
T26-L6 · DDD
What is the boundary called within which a model and its language are consistent, while outside the same words mean other models?
Верный ответ: bounded context
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
100
T26-L7 · DDD
An anemic model (objects with only getters/setters, logic in services) is the recommended DDD style.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T26-L8 · DDD
Bounded context means each context has its own model: the same concept in different contexts is a different class.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T26-L9 · DDD
What does this code output?
```php
final class Order
{
private array $items = [];
public function add(string $sku): void
{
$this->items[$sku] = true;
}
public function count(): int
{
return count($this->items);
}
public function remove(string $sku): void
{
if (count($this->items) === 1) {
throw new DomainException('last item');
}
unset($this->items[$sku]);
}
}
$o = new Order;
$o->add('a');
try {
$o->remove('a');
} catch (DomainException) {
}
echo $o->count();
```
Верный ответ: 1
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T26-L10 · DDD
What does this code output?
```php
final class Money
{
public function __construct(public readonly int $amount) {}
public function add(Money $o): Money
{
return new self($this->amount + $o->amount);
}
}
$a = new Money(10);
$c = $a->add(new Money(5));
echo $a->amount . ',' . $c->amount;
```
Верный ответ: 10,15
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
88.0%
Symfony
80
T13-L1 · Symfony
Services in the Symfony DI container are created lazily by default — on first use.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
100
T13-L2 · Symfony
Which Symfony console command lists all registered routes?
Верный ответ: debug:router
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T13-L3 · Symfony
Symfony autowiring requires manually declaring every service in services.yaml.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T13-L4 · Symfony
Twig templates are compiled into PHP classes and cached between requests.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
40
T13-L5 · Symfony
In the Symfony dev environment the DI container is rebuilt only after tracked files change, not on every request.
Верный ответ: yes
run-72: ✓ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✗
100
T13-L6 · Symfony
Which environment variable selects the active Symfony environment (dev/prod)?
Верный ответ: app_env
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T13-L7 · Symfony
A controller method can be private — Symfony routing works with any method of the class.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T13-L8 · Symfony
Event subscribers always receive events before listeners, because the interface gives them priority.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T13-L9 · Symfony
What does this code output?
```php
use Symfony\Component\HttpFoundation\Request;
$r = Request::create('/demo', 'GET', [], [], [], ['HTTP_X_TOKEN' => 'abc']);
echo $r->headers->get('X-Token') === 'abc' ? 'mapped' : 'missing';
```
Верный ответ: mapped
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
0
T13-L10 · Symfony
What does this code output?
```php
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Contracts\EventDispatcher\Event;
$d = new EventDispatcher();
$out = '';
$d->addListener('e', function () use (&$out) { $out .= 'B'; }, 10);
$d->addListener('e', function () use (&$out) { $out .= 'A'; });
$d->addListener('e', function () use (&$out) { $out .= 'C'; }, 5);
$d->dispatch(new Event(), 'e');
echo $out;
```
Верный ответ: bca
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
80.0%
100
T13-L1 · Symfony
Services in the Symfony DI container are created lazily by default — on first use.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T13-L2 · Symfony
Which Symfony console command lists all registered routes?
Верный ответ: debug:router
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T13-L3 · Symfony
Symfony autowiring requires manually declaring every service in services.yaml.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T13-L4 · Symfony
Twig templates are compiled into PHP classes and cached between requests.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T13-L5 · Symfony
In the Symfony dev environment the DI container is rebuilt only after tracked files change, not on every request.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T13-L6 · Symfony
Which environment variable selects the active Symfony environment (dev/prod)?
Верный ответ: app_env
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T13-L7 · Symfony
A controller method can be private — Symfony routing works with any method of the class.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✗ · run-80: ✓ · run-81: ✓
100
T13-L8 · Symfony
Event subscribers always receive events before listeners, because the interface gives them priority.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T13-L9 · Symfony
What does this code output?
```php
use Symfony\Component\HttpFoundation\Request;
$r = Request::create('/demo', 'GET', [], [], [], ['HTTP_X_TOKEN' => 'abc']);
echo $r->headers->get('X-Token') === 'abc' ? 'mapped' : 'missing';
```
Верный ответ: mapped
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T13-L10 · Symfony
What does this code output?
```php
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Contracts\EventDispatcher\Event;
$d = new EventDispatcher();
$out = '';
$d->addListener('e', function () use (&$out) { $out .= 'B'; }, 10);
$d->addListener('e', function () use (&$out) { $out .= 'A'; });
$d->addListener('e', function () use (&$out) { $out .= 'C'; }, 5);
$d->dispatch(new Event(), 'e');
echo $out;
```
Верный ответ: bca
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
98.0%
100
T13-L1 · Symfony
Services in the Symfony DI container are created lazily by default — on first use.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T13-L2 · Symfony
Which Symfony console command lists all registered routes?
Верный ответ: debug:router
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T13-L3 · Symfony
Symfony autowiring requires manually declaring every service in services.yaml.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T13-L4 · Symfony
Twig templates are compiled into PHP classes and cached between requests.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T13-L5 · Symfony
In the Symfony dev environment the DI container is rebuilt only after tracked files change, not on every request.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T13-L6 · Symfony
Which environment variable selects the active Symfony environment (dev/prod)?
Верный ответ: app_env
run-100: ✓ · run-101: ✓ · run-97: ✗ · run-98: ✓ · run-99: ✓
100
T13-L7 · Symfony
A controller method can be private — Symfony routing works with any method of the class.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T13-L8 · Symfony
Event subscribers always receive events before listeners, because the interface gives them priority.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T13-L9 · Symfony
What does this code output?
```php
use Symfony\Component\HttpFoundation\Request;
$r = Request::create('/demo', 'GET', [], [], [], ['HTTP_X_TOKEN' => 'abc']);
echo $r->headers->get('X-Token') === 'abc' ? 'mapped' : 'missing';
```
Верный ответ: mapped
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T13-L10 · Symfony
What does this code output?
```php
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Contracts\EventDispatcher\Event;
$d = new EventDispatcher();
$out = '';
$d->addListener('e', function () use (&$out) { $out .= 'B'; }, 10);
$d->addListener('e', function () use (&$out) { $out .= 'A'; });
$d->addListener('e', function () use (&$out) { $out .= 'C'; }, 5);
$d->dispatch(new Event(), 'e');
echo $out;
```
Верный ответ: bca
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
98.0%
Symfony: Security and forms
80
T22-L1 · Symfony: Security and forms
In modern Symfony (6.0+) authentication is built on authenticator classes (AuthenticatorInterface); the old guard system has been removed.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
100
T22-L2 · Symfony: Security and forms
Which Symfony attribute checks a role/permission right on a controller method (403 without it)?
Верный ответ: isgranted
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T22-L3 · Symfony: Security and forms
Voters are Symfony's mechanism for checking access to a specific object: isGranted('EDIT', $post).
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T22-L4 · Symfony: Security and forms
In modern Symfony (7+) validation constraints are declared as PHP attributes (#[Assert\NotBlank]); doctrine annotations are no longer supported.
Верный ответ: yes
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✗
100
T22-L5 · Symfony: Security and forms
CSRF protection of Symfony forms is enabled by default: the form validates the token on submission.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T22-L6 · Symfony: Security and forms
Form validation in Symfony runs server-side even if the client-side (HTML5) checks passed.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T22-L7 · Symfony: Security and forms
Which Symfony maker command generates a form class (FormType)?
Верный ответ: make:form
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T22-L8 · Symfony: Security and forms
Symfony stores the user's password in the session in plain text.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T22-L9 · Symfony: Security and forms
What does this code output?
```php
use Symfony\Component\Validator\Validation;
use Symfony\Component\Validator\Constraints as Assert;
$v = Validation::createValidator();
echo count($v->validate([''], [new Assert\NotBlank()]));
```
Верный ответ: 0
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✗
20
T22-L10 · Symfony: Security and forms
What does this code output?
```php
use Symfony\Component\Form\Forms;
use Symfony\Component\Form\Extension\Core\Type\TextType;
$factory = Forms::createFormFactoryBuilder()->getFormFactory();
$form = $factory->create(TextType::class);
try {
echo $form->isValid() ? 'valid' : 'invalid';
} catch (Throwable $e) {
echo get_class($e);
}
```
Верный ответ: symfony\component\form\exception\logicexception
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✗
74.0%
100
T22-L1 · Symfony: Security and forms
In modern Symfony (6.0+) authentication is built on authenticator classes (AuthenticatorInterface); the old guard system has been removed.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T22-L2 · Symfony: Security and forms
Which Symfony attribute checks a role/permission right on a controller method (403 without it)?
Верный ответ: isgranted
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T22-L3 · Symfony: Security and forms
Voters are Symfony's mechanism for checking access to a specific object: isGranted('EDIT', $post).
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
60
T22-L4 · Symfony: Security and forms
In modern Symfony (7+) validation constraints are declared as PHP attributes (#[Assert\NotBlank]); doctrine annotations are no longer supported.
Верный ответ: yes
run-77: ✗ · run-78: ✗ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T22-L5 · Symfony: Security and forms
CSRF protection of Symfony forms is enabled by default: the form validates the token on submission.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T22-L6 · Symfony: Security and forms
Form validation in Symfony runs server-side even if the client-side (HTML5) checks passed.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T22-L7 · Symfony: Security and forms
Which Symfony maker command generates a form class (FormType)?
Верный ответ: make:form
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T22-L8 · Symfony: Security and forms
Symfony stores the user's password in the session in plain text.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T22-L9 · Symfony: Security and forms
What does this code output?
```php
use Symfony\Component\Validator\Validation;
use Symfony\Component\Validator\Constraints as Assert;
$v = Validation::createValidator();
echo count($v->validate([''], [new Assert\NotBlank()]));
```
Верный ответ: 0
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
20
T22-L10 · Symfony: Security and forms
What does this code output?
```php
use Symfony\Component\Form\Forms;
use Symfony\Component\Form\Extension\Core\Type\TextType;
$factory = Forms::createFormFactoryBuilder()->getFormFactory();
$form = $factory->create(TextType::class);
try {
echo $form->isValid() ? 'valid' : 'invalid';
} catch (Throwable $e) {
echo get_class($e);
}
```
Верный ответ: symfony\component\form\exception\logicexception
run-77: ✗ · run-78: ✗ · run-79: ✓ · run-80: ✗ · run-81: ✗
88.0%
100
T22-L1 · Symfony: Security and forms
In modern Symfony (6.0+) authentication is built on authenticator classes (AuthenticatorInterface); the old guard system has been removed.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T22-L2 · Symfony: Security and forms
Which Symfony attribute checks a role/permission right on a controller method (403 without it)?
Верный ответ: isgranted
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T22-L3 · Symfony: Security and forms
Voters are Symfony's mechanism for checking access to a specific object: isGranted('EDIT', $post).
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T22-L4 · Symfony: Security and forms
In modern Symfony (7+) validation constraints are declared as PHP attributes (#[Assert\NotBlank]); doctrine annotations are no longer supported.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T22-L5 · Symfony: Security and forms
CSRF protection of Symfony forms is enabled by default: the form validates the token on submission.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T22-L6 · Symfony: Security and forms
Form validation in Symfony runs server-side even if the client-side (HTML5) checks passed.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T22-L7 · Symfony: Security and forms
Which Symfony maker command generates a form class (FormType)?
Верный ответ: make:form
run-100: ✓ · run-101: ✗ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T22-L8 · Symfony: Security and forms
Symfony stores the user's password in the session in plain text.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T22-L9 · Symfony: Security and forms
What does this code output?
```php
use Symfony\Component\Validator\Validation;
use Symfony\Component\Validator\Constraints as Assert;
$v = Validation::createValidator();
echo count($v->validate([''], [new Assert\NotBlank()]));
```
Верный ответ: 0
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T22-L10 · Symfony: Security and forms
What does this code output?
```php
use Symfony\Component\Form\Forms;
use Symfony\Component\Form\Extension\Core\Type\TextType;
$factory = Forms::createFormFactoryBuilder()->getFormFactory();
$form = $factory->create(TextType::class);
try {
echo $form->isValid() ? 'valid' : 'invalid';
} catch (Throwable $e) {
echo get_class($e);
}
```
Верный ответ: symfony\component\form\exception\logicexception
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✗
96.0%
Symfony: configuration and services
100
T23-L1 · Symfony: configuration and services
Symfony bundle configuration lives in config/packages — one file per bundle or topic.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T23-L2 · Symfony: configuration and services
The .env file with dev defaults is committed to the repository, while real secrets live in the non-committed .env.local.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T23-L3 · Symfony: configuration and services
Which Symfony command lists the container's registered services and their aliases?
Верный ответ: debug:container
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
T23-L4 · Symfony: configuration and services
The Symfony container allows changing parameters at runtime: $container->setParameter() works from a controller.
Верный ответ: no
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T23-L5 · Symfony: configuration and services
By default, Symfony services are public (public: true) — you can fetch them directly from the container.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T23-L6 · Symfony: configuration and services
Without a config file in config/packages a bundle will not work — configuration is mandatory for every bundle.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T23-L7 · Symfony: configuration and services
Environment variable values are injected into services.yaml using the %env(VAR)% syntax.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
T23-L8 · Symfony: configuration and services
Which Symfony environment variable enables debug mode (affects the profiler and Twig debugging)?
Верный ответ: app_debug
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T23-L9 · Symfony: configuration and services
What does this code output?
```php
use Symfony\Component\DependencyInjection\ContainerBuilder;
$c = new ContainerBuilder();
$c->register('a', stdClass::class)->setPublic(true);
$c->compile();
echo spl_object_id($c->get('a')) === spl_object_id($c->get('a')) ? 'same' : 'diff';
```
Верный ответ: same
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T23-L10 · Symfony: configuration and services
What does this code output?
```php
use Symfony\Component\DependencyInjection\ContainerBuilder;
$c = new ContainerBuilder();
$c->setParameter('name', 'Bob');
$c->setParameter('greeting', 'hi %name%');
$c->setParameter('message', '%greeting%!');
$c->compile();
echo $c->getParameter('message');
```
Верный ответ: hi bob!
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
90.0%
100
T23-L1 · Symfony: configuration and services
Symfony bundle configuration lives in config/packages — one file per bundle or topic.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T23-L2 · Symfony: configuration and services
The .env file with dev defaults is committed to the repository, while real secrets live in the non-committed .env.local.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
60
T23-L3 · Symfony: configuration and services
Which Symfony command lists the container's registered services and their aliases?
Верный ответ: debug:container
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✗ · run-81: ✗
20
T23-L4 · Symfony: configuration and services
The Symfony container allows changing parameters at runtime: $container->setParameter() works from a controller.
Верный ответ: no
run-77: ✗ · run-78: ✓ · run-79: ✗ · run-80: ✗ · run-81: ✗
100
T23-L5 · Symfony: configuration and services
By default, Symfony services are public (public: true) — you can fetch them directly from the container.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T23-L6 · Symfony: configuration and services
Without a config file in config/packages a bundle will not work — configuration is mandatory for every bundle.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T23-L7 · Symfony: configuration and services
Environment variable values are injected into services.yaml using the %env(VAR)% syntax.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T23-L8 · Symfony: configuration and services
Which Symfony environment variable enables debug mode (affects the profiler and Twig debugging)?
Верный ответ: app_debug
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T23-L9 · Symfony: configuration and services
What does this code output?
```php
use Symfony\Component\DependencyInjection\ContainerBuilder;
$c = new ContainerBuilder();
$c->register('a', stdClass::class)->setPublic(true);
$c->compile();
echo spl_object_id($c->get('a')) === spl_object_id($c->get('a')) ? 'same' : 'diff';
```
Верный ответ: same
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T23-L10 · Symfony: configuration and services
What does this code output?
```php
use Symfony\Component\DependencyInjection\ContainerBuilder;
$c = new ContainerBuilder();
$c->setParameter('name', 'Bob');
$c->setParameter('greeting', 'hi %name%');
$c->setParameter('message', '%greeting%!');
$c->compile();
echo $c->getParameter('message');
```
Верный ответ: hi bob!
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
88.0%
100
T23-L1 · Symfony: configuration and services
Symfony bundle configuration lives in config/packages — one file per bundle or topic.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T23-L2 · Symfony: configuration and services
The .env file with dev defaults is committed to the repository, while real secrets live in the non-committed .env.local.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✗
100
T23-L3 · Symfony: configuration and services
Which Symfony command lists the container's registered services and their aliases?
Верный ответ: debug:container
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
20
T23-L4 · Symfony: configuration and services
The Symfony container allows changing parameters at runtime: $container->setParameter() works from a controller.
Верный ответ: no
run-100: ✗ · run-101: ✗ · run-97: ✓ · run-98: ✗ · run-99: ✗
100
T23-L5 · Symfony: configuration and services
By default, Symfony services are public (public: true) — you can fetch them directly from the container.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T23-L6 · Symfony: configuration and services
Without a config file in config/packages a bundle will not work — configuration is mandatory for every bundle.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T23-L7 · Symfony: configuration and services
Environment variable values are injected into services.yaml using the %env(VAR)% syntax.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T23-L8 · Symfony: configuration and services
Which Symfony environment variable enables debug mode (affects the profiler and Twig debugging)?
Верный ответ: app_debug
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T23-L9 · Symfony: configuration and services
What does this code output?
```php
use Symfony\Component\DependencyInjection\ContainerBuilder;
$c = new ContainerBuilder();
$c->register('a', stdClass::class)->setPublic(true);
$c->compile();
echo spl_object_id($c->get('a')) === spl_object_id($c->get('a')) ? 'same' : 'diff';
```
Верный ответ: same
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T23-L10 · Symfony: configuration and services
What does this code output?
```php
use Symfony\Component\DependencyInjection\ContainerBuilder;
$c = new ContainerBuilder();
$c->setParameter('name', 'Bob');
$c->setParameter('greeting', 'hi %name%');
$c->setParameter('message', '%greeting%!');
$c->compile();
echo $c->getParameter('message');
```
Верный ответ: hi bob!
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✗ · run-99: ✓
88.0%
Symfony: Messenger
80
T16-L1 · Symfony: Messenger
A single message in Symfony Messenger can only have one handler.
Верный ответ: no
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T16-L2 · Symfony: Messenger
The sync transport in Messenger queues the message for a worker, just like async.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T16-L3 · Symfony: Messenger
Which console command starts the worker that processes Messenger queue messages?
Верный ответ: messenger:consume
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T16-L4 · Symfony: Messenger
Retries for failed messages (retry_strategy) are configured per Messenger transport.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
60
T16-L5 · Symfony: Messenger
By default, Messenger serializes messages to JSON.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✗ · run-76: ✓
60
T16-L6 · Symfony: Messenger
Symfony Scheduler produces messages on a schedule and dispatches them through Messenger.
Верный ответ: yes
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
100
T16-L7 · Symfony: Messenger
Which built-in Messenger transport stores messages in database tables via Doctrine?
Верный ответ: doctrine
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T16-L8 · Symfony: Messenger
The Messenger pipeline can be extended with custom middleware, placed before or after the built-in ones.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T16-L9 · Symfony: Messenger
What does this code output?
```php
use Symfony\Component\Messenger\MessageBus;
use Symfony\Component\Messenger\Middleware\MiddlewareInterface;
use Symfony\Component\Messenger\Middleware\StackInterface;
use Symfony\Component\Messenger\Envelope;
final class Trace implements MiddlewareInterface
{
public function __construct(private string $tag) {}
public function handle(Envelope $e, StackInterface $stack): Envelope
{
echo $this->tag;
return $stack->next()->handle($e, $stack);
}
}
$bus = new MessageBus([new Trace('M1'), new Trace('M2')]);
$bus->dispatch(new Envelope(new stdClass()));
```
Верный ответ: m1m2
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T16-L10 · Symfony: Messenger
What does this code output?
```php
use Symfony\Component\Messenger\MessageBus;
use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware;
use Symfony\Component\Messenger\Handler\HandlersLocator;
use Symfony\Component\Messenger\Handler\HandlerDescriptor;
use Symfony\Component\Messenger\Envelope;
class Ping {}
$n = 0;
$d1 = new HandlerDescriptor(function (Ping $m) use (&$n) { $n += 1; }, ['alias' => 'h1']);
$d2 = new HandlerDescriptor(function (Ping $m) use (&$n) { $n += 10; }, ['alias' => 'h2']);
$bus = new MessageBus([
new HandleMessageMiddleware(new HandlersLocator([Ping::class => [$d1, $d2]])),
]);
$bus->dispatch(new Envelope(new Ping()));
echo $n;
```
Верный ответ: 11
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
86.0%
100
T16-L1 · Symfony: Messenger
A single message in Symfony Messenger can only have one handler.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T16-L2 · Symfony: Messenger
The sync transport in Messenger queues the message for a worker, just like async.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T16-L3 · Symfony: Messenger
Which console command starts the worker that processes Messenger queue messages?
Верный ответ: messenger:consume
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
60
T16-L4 · Symfony: Messenger
Retries for failed messages (retry_strategy) are configured per Messenger transport.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✗ · run-81: ✗
20
T16-L5 · Symfony: Messenger
By default, Messenger serializes messages to JSON.
Верный ответ: no
run-77: ✗ · run-78: ✗ · run-79: ✓ · run-80: ✗ · run-81: ✗
80
T16-L6 · Symfony: Messenger
Symfony Scheduler produces messages on a schedule and dispatches them through Messenger.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✗ · run-81: ✓
100
T16-L7 · Symfony: Messenger
Which built-in Messenger transport stores messages in database tables via Doctrine?
Верный ответ: doctrine
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T16-L8 · Symfony: Messenger
The Messenger pipeline can be extended with custom middleware, placed before or after the built-in ones.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T16-L9 · Symfony: Messenger
What does this code output?
```php
use Symfony\Component\Messenger\MessageBus;
use Symfony\Component\Messenger\Middleware\MiddlewareInterface;
use Symfony\Component\Messenger\Middleware\StackInterface;
use Symfony\Component\Messenger\Envelope;
final class Trace implements MiddlewareInterface
{
public function __construct(private string $tag) {}
public function handle(Envelope $e, StackInterface $stack): Envelope
{
echo $this->tag;
return $stack->next()->handle($e, $stack);
}
}
$bus = new MessageBus([new Trace('M1'), new Trace('M2')]);
$bus->dispatch(new Envelope(new stdClass()));
```
Верный ответ: m1m2
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T16-L10 · Symfony: Messenger
What does this code output?
```php
use Symfony\Component\Messenger\MessageBus;
use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware;
use Symfony\Component\Messenger\Handler\HandlersLocator;
use Symfony\Component\Messenger\Handler\HandlerDescriptor;
use Symfony\Component\Messenger\Envelope;
class Ping {}
$n = 0;
$d1 = new HandlerDescriptor(function (Ping $m) use (&$n) { $n += 1; }, ['alias' => 'h1']);
$d2 = new HandlerDescriptor(function (Ping $m) use (&$n) { $n += 10; }, ['alias' => 'h2']);
$bus = new MessageBus([
new HandleMessageMiddleware(new HandlersLocator([Ping::class => [$d1, $d2]])),
]);
$bus->dispatch(new Envelope(new Ping()));
echo $n;
```
Верный ответ: 11
run-77: ✗ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
84.0%
100
T16-L1 · Symfony: Messenger
A single message in Symfony Messenger can only have one handler.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T16-L2 · Symfony: Messenger
The sync transport in Messenger queues the message for a worker, just like async.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T16-L3 · Symfony: Messenger
Which console command starts the worker that processes Messenger queue messages?
Верный ответ: messenger:consume
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
20
T16-L4 · Symfony: Messenger
Retries for failed messages (retry_strategy) are configured per Messenger transport.
Верный ответ: yes
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✓ · run-99: ✗
20
T16-L5 · Symfony: Messenger
By default, Messenger serializes messages to JSON.
Верный ответ: no
run-100: ✗ · run-101: ✗ · run-97: ✓ · run-98: ✗ · run-99: ✗
100
T16-L6 · Symfony: Messenger
Symfony Scheduler produces messages on a schedule and dispatches them through Messenger.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T16-L7 · Symfony: Messenger
Which built-in Messenger transport stores messages in database tables via Doctrine?
Верный ответ: doctrine
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T16-L8 · Symfony: Messenger
The Messenger pipeline can be extended with custom middleware, placed before or after the built-in ones.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T16-L9 · Symfony: Messenger
What does this code output?
```php
use Symfony\Component\Messenger\MessageBus;
use Symfony\Component\Messenger\Middleware\MiddlewareInterface;
use Symfony\Component\Messenger\Middleware\StackInterface;
use Symfony\Component\Messenger\Envelope;
final class Trace implements MiddlewareInterface
{
public function __construct(private string $tag) {}
public function handle(Envelope $e, StackInterface $stack): Envelope
{
echo $this->tag;
return $stack->next()->handle($e, $stack);
}
}
$bus = new MessageBus([new Trace('M1'), new Trace('M2')]);
$bus->dispatch(new Envelope(new stdClass()));
```
Верный ответ: m1m2
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T16-L10 · Symfony: Messenger
What does this code output?
```php
use Symfony\Component\Messenger\MessageBus;
use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware;
use Symfony\Component\Messenger\Handler\HandlersLocator;
use Symfony\Component\Messenger\Handler\HandlerDescriptor;
use Symfony\Component\Messenger\Envelope;
class Ping {}
$n = 0;
$d1 = new HandlerDescriptor(function (Ping $m) use (&$n) { $n += 1; }, ['alias' => 'h1']);
$d2 = new HandlerDescriptor(function (Ping $m) use (&$n) { $n += 10; }, ['alias' => 'h2']);
$bus = new MessageBus([
new HandleMessageMiddleware(new HandlersLocator([Ping::class => [$d1, $d2]])),
]);
$bus->dispatch(new Envelope(new Ping()));
echo $n;
```
Верный ответ: 11
run-100: ✓ · run-101: ✗ · run-97: ✓ · run-98: ✓ · run-99: ✓
82.0%
Symfony: versions
100
T28-L1 · Symfony: versions
Symfony major releases come every two years, minor ones every six months (in May and November).
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T28-L2 · Symfony: versions
What is the minimum PHP version required by Symfony 8?
Верный ответ: 8.4
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
100
T28-L3 · Symfony: versions
Symfony 7.0 kept support for docblock annotations (validation, routes).
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T28-L4 · Symfony: versions
AssetMapper manages CSS/JS without node or webpack — via importmap.php.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T28-L5 · Symfony: versions
Symfony 6.4 is a regular release without long-term support.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T28-L6 · Symfony: versions
When moving to a new Symfony major version, deprecations of the previous branch keep working — major releases do not remove them.
Верный ответ: no
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T28-L7 · Symfony: versions
Every Symfony major release is accompanied by an UPGRADE guide listing the changes.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T28-L8 · Symfony: versions
Which Symfony component manages assets and the importmap without node/webpack?
Верный ответ: asset-mapper
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✗
100
T28-L9 · Symfony: versions
The project was upgraded from Symfony 6.4 to 8.1. What does this code output on 8.1?
```php
echo class_exists(\Symfony\Component\Security\Guard\AbstractGuardAuthenticator::class)
? 'yes' : 'no';
```
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T28-L10 · Symfony: versions
The project was upgraded from Symfony 6.4 to 8.1. What does this code output on 8.1?
```php
echo class_exists(\Symfony\Component\Routing\Loader\AnnotationClassLoader::class)
? 'yes' : 'no';
echo class_exists(\Symfony\Component\Routing\Loader\AttributeClassLoader::class)
? 'yes' : 'no';
```
Верный ответ: noyes
run-72: ✓ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
80.0%
40
T28-L1 · Symfony: versions
Symfony major releases come every two years, minor ones every six months (in May and November).
Верный ответ: yes
run-77: ✗ · run-78: ✗ · run-79: ✓ · run-80: ✗ · run-81: ✓
100
T28-L2 · Symfony: versions
What is the minimum PHP version required by Symfony 8?
Верный ответ: 8.4
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T28-L3 · Symfony: versions
Symfony 7.0 kept support for docblock annotations (validation, routes).
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T28-L4 · Symfony: versions
AssetMapper manages CSS/JS without node or webpack — via importmap.php.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T28-L5 · Symfony: versions
Symfony 6.4 is a regular release without long-term support.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T28-L6 · Symfony: versions
When moving to a new Symfony major version, deprecations of the previous branch keep working — major releases do not remove them.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T28-L7 · Symfony: versions
Every Symfony major release is accompanied by an UPGRADE guide listing the changes.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T28-L8 · Symfony: versions
Which Symfony component manages assets and the importmap without node/webpack?
Верный ответ: asset-mapper
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T28-L9 · Symfony: versions
The project was upgraded from Symfony 6.4 to 8.1. What does this code output on 8.1?
```php
echo class_exists(\Symfony\Component\Security\Guard\AbstractGuardAuthenticator::class)
? 'yes' : 'no';
```
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T28-L10 · Symfony: versions
The project was upgraded from Symfony 6.4 to 8.1. What does this code output on 8.1?
```php
echo class_exists(\Symfony\Component\Routing\Loader\AnnotationClassLoader::class)
? 'yes' : 'no';
echo class_exists(\Symfony\Component\Routing\Loader\AttributeClassLoader::class)
? 'yes' : 'no';
```
Верный ответ: noyes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✗
92.0%
100
T28-L1 · Symfony: versions
Symfony major releases come every two years, minor ones every six months (in May and November).
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T28-L2 · Symfony: versions
What is the minimum PHP version required by Symfony 8?
Верный ответ: 8.4
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T28-L3 · Symfony: versions
Symfony 7.0 kept support for docblock annotations (validation, routes).
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✗ · run-99: ✓
100
T28-L4 · Symfony: versions
AssetMapper manages CSS/JS without node or webpack — via importmap.php.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T28-L5 · Symfony: versions
Symfony 6.4 is a regular release without long-term support.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
60
T28-L6 · Symfony: versions
When moving to a new Symfony major version, deprecations of the previous branch keep working — major releases do not remove them.
Верный ответ: no
run-100: ✗ · run-101: ✗ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T28-L7 · Symfony: versions
Every Symfony major release is accompanied by an UPGRADE guide listing the changes.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T28-L8 · Symfony: versions
Which Symfony component manages assets and the importmap without node/webpack?
Верный ответ: asset-mapper
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T28-L9 · Symfony: versions
The project was upgraded from Symfony 6.4 to 8.1. What does this code output on 8.1?
```php
echo class_exists(\Symfony\Component\Security\Guard\AbstractGuardAuthenticator::class)
? 'yes' : 'no';
```
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T28-L10 · Symfony: versions
The project was upgraded from Symfony 6.4 to 8.1. What does this code output on 8.1?
```php
echo class_exists(\Symfony\Component\Routing\Loader\AnnotationClassLoader::class)
? 'yes' : 'no';
echo class_exists(\Symfony\Component\Routing\Loader\AttributeClassLoader::class)
? 'yes' : 'no';
```
Верный ответ: noyes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
94.0%
Symfony: 8.2 and beyond
60
T29-L1 · Symfony: 8.2 and beyond
As of 2026-11-07, Symfony 8.2 has already been released.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✗
60
T29-L2 · Symfony: 8.2 and beyond
As of 2026-11-07, Symfony 8.2 is scheduled for November 2026, following the usual six-month cycle.
Верный ответ: yes
run-72: ✗ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T29-L3 · Symfony: 8.2 and beyond
Which Symfony version comes after 8.1 (as of 2026-11-07)?
Верный ответ: 8.2
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T29-L4 · Symfony: 8.2 and beyond
Symfony 8.2 is a major release requiring applications to be rewritten for new APIs.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T29-L5 · Symfony: 8.2 and beyond
Updating within a major branch (8.1 → 8.2) should not require code changes — backward compatibility is preserved.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T29-L6 · Symfony: 8.2 and beyond
Which minor version of the 8.x branch is released last, before Symfony 9.0?
Верный ответ: 8.4
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
80
T29-L7 · Symfony: 8.2 and beyond
Symfony 8.2 will require PHP 8.5 — you would have to upgrade PHP along with it.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
100
T29-L8 · Symfony: 8.2 and beyond
Deprecations added in the 8.x branch will not be removed before Symfony 9.0.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
85.0%
100
T29-L1 · Symfony: 8.2 and beyond
As of 2026-11-07, Symfony 8.2 has already been released.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
20
T29-L2 · Symfony: 8.2 and beyond
As of 2026-11-07, Symfony 8.2 is scheduled for November 2026, following the usual six-month cycle.
Верный ответ: yes
run-77: ✗ · run-78: ✗ · run-79: ✓ · run-80: ✗ · run-81: ✗
100
T29-L3 · Symfony: 8.2 and beyond
Which Symfony version comes after 8.1 (as of 2026-11-07)?
Верный ответ: 8.2
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T29-L4 · Symfony: 8.2 and beyond
Symfony 8.2 is a major release requiring applications to be rewritten for new APIs.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T29-L5 · Symfony: 8.2 and beyond
Updating within a major branch (8.1 → 8.2) should not require code changes — backward compatibility is preserved.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T29-L6 · Symfony: 8.2 and beyond
Which minor version of the 8.x branch is released last, before Symfony 9.0?
Верный ответ: 8.4
run-77: ✓ · run-78: ✗ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T29-L7 · Symfony: 8.2 and beyond
Symfony 8.2 will require PHP 8.5 — you would have to upgrade PHP along with it.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T29-L8 · Symfony: 8.2 and beyond
Deprecations added in the 8.x branch will not be removed before Symfony 9.0.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
87.5%
60
T29-L1 · Symfony: 8.2 and beyond
As of 2026-11-07, Symfony 8.2 has already been released.
Верный ответ: no
run-100: ✓ · run-101: ✗ · run-97: ✓ · run-98: ✗ · run-99: ✓
60
T29-L2 · Symfony: 8.2 and beyond
As of 2026-11-07, Symfony 8.2 is scheduled for November 2026, following the usual six-month cycle.
Верный ответ: yes
run-100: ✓ · run-101: ✗ · run-97: ✗ · run-98: ✓ · run-99: ✓
100
T29-L3 · Symfony: 8.2 and beyond
Which Symfony version comes after 8.1 (as of 2026-11-07)?
Верный ответ: 8.2
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T29-L4 · Symfony: 8.2 and beyond
Symfony 8.2 is a major release requiring applications to be rewritten for new APIs.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T29-L5 · Symfony: 8.2 and beyond
Updating within a major branch (8.1 → 8.2) should not require code changes — backward compatibility is preserved.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T29-L6 · Symfony: 8.2 and beyond
Which minor version of the 8.x branch is released last, before Symfony 9.0?
Верный ответ: 8.4
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T29-L7 · Symfony: 8.2 and beyond
Symfony 8.2 will require PHP 8.5 — you would have to upgrade PHP along with it.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T29-L8 · Symfony: 8.2 and beyond
Deprecations added in the 8.x branch will not be removed before Symfony 9.0.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
90.0%
Twig
100
T21-L1 · Twig
Inside {{ }}, Twig allows calling arbitrary PHP code directly.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T21-L2 · Twig
By default, Twig auto-escapes printed variables.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T21-L3 · Twig
The Twig |e filter escapes a string for safe output in an HTML context.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
0
T21-L4 · Twig
Which filter from twig/intl-extra formats a number according to a locale?
Верный ответ: format_number
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
T21-L5 · Twig
The |raw filter disables auto-escaping for the value.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T21-L6 · Twig
In Twig, {{ }} prints an expression value, while {% %} executes tags — conditions, loops, set.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T21-L7 · Twig
In Twig you cannot declare a variable inside a template — values only come from the controller.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T21-L8 · Twig
Which Twig function dumps the debug structure of a variable (array, object)?
Верный ответ: dump
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
T21-L9 · Twig
What does this Twig template output?
```twig
{{ false|default(2) * 3 }}
```
Верный ответ: 6
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✗ · run-76: ✓
40
T21-L10 · Twig
What exception class does render() of this template throw?
```twig
{{ 'a' ~ 1 + 2 }}
```
Верный ответ: runtimeerror
run-72: ✗ · run-73: ✓ · run-74: ✗ · run-75: ✗ · run-76: ✓
80.0%
100
T21-L1 · Twig
Inside {{ }}, Twig allows calling arbitrary PHP code directly.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T21-L2 · Twig
By default, Twig auto-escapes printed variables.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T21-L3 · Twig
The Twig |e filter escapes a string for safe output in an HTML context.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
0
T21-L4 · Twig
Which filter from twig/intl-extra formats a number according to a locale?
Верный ответ: format_number
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
100
T21-L5 · Twig
The |raw filter disables auto-escaping for the value.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T21-L6 · Twig
In Twig, {{ }} prints an expression value, while {% %} executes tags — conditions, loops, set.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T21-L7 · Twig
In Twig you cannot declare a variable inside a template — values only come from the controller.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T21-L8 · Twig
Which Twig function dumps the debug structure of a variable (array, object)?
Верный ответ: dump
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
0
T21-L9 · Twig
What does this Twig template output?
```twig
{{ false|default(2) * 3 }}
```
Верный ответ: 6
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
0
T21-L10 · Twig
What exception class does render() of this template throw?
```twig
{{ 'a' ~ 1 + 2 }}
```
Верный ответ: runtimeerror
run-77: ✗ · run-78: ✗ · run-79: ✗ · run-80: ✗ · run-81: ✗
70.0%
100
T21-L1 · Twig
Inside {{ }}, Twig allows calling arbitrary PHP code directly.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T21-L2 · Twig
By default, Twig auto-escapes printed variables.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T21-L3 · Twig
The Twig |e filter escapes a string for safe output in an HTML context.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
0
T21-L4 · Twig
Which filter from twig/intl-extra formats a number according to a locale?
Верный ответ: format_number
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
100
T21-L5 · Twig
The |raw filter disables auto-escaping for the value.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T21-L6 · Twig
In Twig, {{ }} prints an expression value, while {% %} executes tags — conditions, loops, set.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T21-L7 · Twig
In Twig you cannot declare a variable inside a template — values only come from the controller.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T21-L8 · Twig
Which Twig function dumps the debug structure of a variable (array, object)?
Верный ответ: dump
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
20
T21-L9 · Twig
What does this Twig template output?
```twig
{{ false|default(2) * 3 }}
```
Верный ответ: 6
run-100: ✗ · run-101: ✗ · run-97: ✓ · run-98: ✗ · run-99: ✗
0
T21-L10 · Twig
What exception class does render() of this template throw?
```twig
{{ 'a' ~ 1 + 2 }}
```
Верный ответ: runtimeerror
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✗
72.0%
Bootstrap
100
T24-L1 · Bootstrap
Bootstrap is a CSS/JS library of ready-made UI components, not an SPA framework.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T24-L2 · Bootstrap
Which Bootstrap class gives a responsive container with a fixed max width per breakpoint?
Верный ответ: container
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T24-L3 · Bootstrap
The Bootstrap grid is built on CSS floats and splits a row into 16 columns.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
60
T24-L4 · Bootstrap
Bootstrap's named breakpoints (the infix used in class names) are sm, md, lg, xl, xxl — five of them.
Верный ответ: yes
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✓
20
T24-L5 · Bootstrap
Utilities like .mt-3 or .px-2 use the spacing scale: the number is a multiple of $spacer.
Верный ответ: no
run-72: ✗ · run-73: ✗ · run-74: ✓ · run-75: ✗ · run-76: ✗
100
T24-L6 · Bootstrap
Which Bootstrap 5 data attribute enables an interactive component (e.g. dropdown) on an element?
Верный ответ: data-bs-toggle
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T24-L7 · Bootstrap
Bootstrap 5 components work without jQuery — in plain vanilla JS.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T24-L8 · Bootstrap
Dark mode in Bootstrap is enabled with a .dark class on the root element.
Верный ответ: no
run-72: ✓ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✗
40
T24-L9 · Bootstrap
What is the max-width of .container in Bootstrap 5.3 at a 992px viewport?
Верный ответ: 960
run-72: ✗ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✗
40
T24-L10 · Bootstrap
Which utility sets the text color in Bootstrap 5.3 for `<p class="text-danger text-primary">…</p>`? Answer with the winning class name.
Верный ответ: text-danger
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✗ · run-76: ✗
68.0%
100
T24-L1 · Bootstrap
Bootstrap is a CSS/JS library of ready-made UI components, not an SPA framework.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T24-L2 · Bootstrap
Which Bootstrap class gives a responsive container with a fixed max width per breakpoint?
Верный ответ: container
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T24-L3 · Bootstrap
The Bootstrap grid is built on CSS floats and splits a row into 16 columns.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T24-L4 · Bootstrap
Bootstrap's named breakpoints (the infix used in class names) are sm, md, lg, xl, xxl — five of them.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
60
T24-L5 · Bootstrap
Utilities like .mt-3 or .px-2 use the spacing scale: the number is a multiple of $spacer.
Верный ответ: no
run-77: ✓ · run-78: ✗ · run-79: ✓ · run-80: ✗ · run-81: ✓
100
T24-L6 · Bootstrap
Which Bootstrap 5 data attribute enables an interactive component (e.g. dropdown) on an element?
Верный ответ: data-bs-toggle
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T24-L7 · Bootstrap
Bootstrap 5 components work without jQuery — in plain vanilla JS.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T24-L8 · Bootstrap
Dark mode in Bootstrap is enabled with a .dark class on the root element.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T24-L9 · Bootstrap
What is the max-width of .container in Bootstrap 5.3 at a 992px viewport?
Верный ответ: 960
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T24-L10 · Bootstrap
Which utility sets the text color in Bootstrap 5.3 for `<p class="text-danger text-primary">…</p>`? Answer with the winning class name.
Верный ответ: text-danger
run-77: ✓ · run-78: ✓ · run-79: ✗ · run-80: ✓ · run-81: ✓
94.0%
100
T24-L1 · Bootstrap
Bootstrap is a CSS/JS library of ready-made UI components, not an SPA framework.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T24-L2 · Bootstrap
Which Bootstrap class gives a responsive container with a fixed max width per breakpoint?
Верный ответ: container
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T24-L3 · Bootstrap
The Bootstrap grid is built on CSS floats and splits a row into 16 columns.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T24-L4 · Bootstrap
Bootstrap's named breakpoints (the infix used in class names) are sm, md, lg, xl, xxl — five of them.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
20
T24-L5 · Bootstrap
Utilities like .mt-3 or .px-2 use the spacing scale: the number is a multiple of $spacer.
Верный ответ: no
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✓
100
T24-L6 · Bootstrap
Which Bootstrap 5 data attribute enables an interactive component (e.g. dropdown) on an element?
Верный ответ: data-bs-toggle
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T24-L7 · Bootstrap
Bootstrap 5 components work without jQuery — in plain vanilla JS.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T24-L8 · Bootstrap
Dark mode in Bootstrap is enabled with a .dark class on the root element.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T24-L9 · Bootstrap
What is the max-width of .container in Bootstrap 5.3 at a 992px viewport?
Верный ответ: 960
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T24-L10 · Bootstrap
Which utility sets the text color in Bootstrap 5.3 for `<p class="text-danger text-primary">…</p>`? Answer with the winning class name.
Верный ответ: text-danger
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
92.0%
Doctrine
100
T14-L1 · Doctrine
Doctrine ORM creates database tables on the fly the first time an entity is used at runtime.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T14-L2 · Doctrine
Which EntityManager method marks a new object as managed without executing SQL until flush()?
Верный ответ: persist
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
40
T14-L3 · Doctrine
In Doctrine ORM 3, the EntityManager::merge() method exists and makes the passed object managed.
Верный ответ: no
run-72: ✗ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T14-L4 · Doctrine
DQL queries are written in terms of entities and their fields, not tables and columns.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T14-L5 · Doctrine
What does $repository->find(999) return when no record with id 999 exists?
Верный ответ: null
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
40
T14-L6 · Doctrine
DoctrineBundle in Symfony automatically calls flush() at the end of every request.
Верный ответ: no
run-72: ✓ · run-73: ✗ · run-74: ✗ · run-75: ✗ · run-76: ✓
100
T14-L7 · Doctrine
For a managed entity, changing a property is enough: flush() commits the change without an explicit persist() — the Unit of Work tracks changes.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T14-L8 · Doctrine
remove() executes the SQL DELETE immediately, without waiting for flush().
Верный ответ: no
run-72: ✗ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T14-L9 · Doctrine
Given: Doctrine ORM 3, an EntityManager on in-memory SQLite, entity User with an auto-increment primary key. The users table is empty. What does this code output?
```php
$u = new User(name: 'B');
$em->persist($u);
$em->remove($u);
$em->flush();
echo count($em->getConnection()->fetchAllAssociative('SELECT * FROM users'));
```
Верный ответ: 0
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T14-L10 · Doctrine
Given: Doctrine ORM 3, an EntityManager on in-memory SQLite, entity User with an auto-increment primary key. The users table is empty. What does this code output?
```php
$u = new User(name: 'A');
$em->persist($u);
$em->flush();
$a = $em->find(User::class, $u->getId());
$b = $em->find(User::class, $u->getId());
echo spl_object_id($a) === spl_object_id($b) ? 'same' : 'diff';
```
Верный ответ: same
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
84.0%
100
T14-L1 · Doctrine
Doctrine ORM creates database tables on the fly the first time an entity is used at runtime.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T14-L2 · Doctrine
Which EntityManager method marks a new object as managed without executing SQL until flush()?
Верный ответ: persist
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T14-L3 · Doctrine
In Doctrine ORM 3, the EntityManager::merge() method exists and makes the passed object managed.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T14-L4 · Doctrine
DQL queries are written in terms of entities and their fields, not tables and columns.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T14-L5 · Doctrine
What does $repository->find(999) return when no record with id 999 exists?
Верный ответ: null
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T14-L6 · Doctrine
DoctrineBundle in Symfony automatically calls flush() at the end of every request.
Верный ответ: no
run-77: ✓ · run-78: ✗ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T14-L7 · Doctrine
For a managed entity, changing a property is enough: flush() commits the change without an explicit persist() — the Unit of Work tracks changes.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T14-L8 · Doctrine
remove() executes the SQL DELETE immediately, without waiting for flush().
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T14-L9 · Doctrine
Given: Doctrine ORM 3, an EntityManager on in-memory SQLite, entity User with an auto-increment primary key. The users table is empty. What does this code output?
```php
$u = new User(name: 'B');
$em->persist($u);
$em->remove($u);
$em->flush();
echo count($em->getConnection()->fetchAllAssociative('SELECT * FROM users'));
```
Верный ответ: 0
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T14-L10 · Doctrine
Given: Doctrine ORM 3, an EntityManager on in-memory SQLite, entity User with an auto-increment primary key. The users table is empty. What does this code output?
```php
$u = new User(name: 'A');
$em->persist($u);
$em->flush();
$a = $em->find(User::class, $u->getId());
$b = $em->find(User::class, $u->getId());
echo spl_object_id($a) === spl_object_id($b) ? 'same' : 'diff';
```
Верный ответ: same
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
98.0%
100
T14-L1 · Doctrine
Doctrine ORM creates database tables on the fly the first time an entity is used at runtime.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T14-L2 · Doctrine
Which EntityManager method marks a new object as managed without executing SQL until flush()?
Верный ответ: persist
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T14-L3 · Doctrine
In Doctrine ORM 3, the EntityManager::merge() method exists and makes the passed object managed.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T14-L4 · Doctrine
DQL queries are written in terms of entities and their fields, not tables and columns.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T14-L5 · Doctrine
What does $repository->find(999) return when no record with id 999 exists?
Верный ответ: null
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
60
T14-L6 · Doctrine
DoctrineBundle in Symfony automatically calls flush() at the end of every request.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✗ · run-98: ✓ · run-99: ✗
100
T14-L7 · Doctrine
For a managed entity, changing a property is enough: flush() commits the change without an explicit persist() — the Unit of Work tracks changes.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T14-L8 · Doctrine
remove() executes the SQL DELETE immediately, without waiting for flush().
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T14-L9 · Doctrine
Given: Doctrine ORM 3, an EntityManager on in-memory SQLite, entity User with an auto-increment primary key. The users table is empty. What does this code output?
```php
$u = new User(name: 'B');
$em->persist($u);
$em->remove($u);
$em->flush();
echo count($em->getConnection()->fetchAllAssociative('SELECT * FROM users'));
```
Верный ответ: 0
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T14-L10 · Doctrine
Given: Doctrine ORM 3, an EntityManager on in-memory SQLite, entity User with an auto-increment primary key. The users table is empty. What does this code output?
```php
$u = new User(name: 'A');
$em->persist($u);
$em->flush();
$a = $em->find(User::class, $u->getId());
$b = $em->find(User::class, $u->getId());
echo spl_object_id($a) === spl_object_id($b) ? 'same' : 'diff';
```
Верный ответ: same
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
96.0%
PostgreSQL
100
T15-L1 · PostgreSQL
PostgreSQL uses MVCC, therefore readers block writers and writers block readers.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T15-L2 · PostgreSQL
Which SQL command shows a query's execution plan without executing the query?
Верный ответ: explain
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T15-L3 · PostgreSQL
SERIAL and GENERATED ... AS IDENTITY are just two names for the same mechanism.
Верный ответ: no
run-72: ✗ · run-73: ✓ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
T15-L4 · PostgreSQL
By default, a PostgreSQL UNIQUE constraint allows only one row with NULL in the column.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T15-L5 · PostgreSQL
Which PostgreSQL aggregate function concatenates strings with a separator?
Верный ответ: string_agg
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T15-L6 · PostgreSQL
Plain VACUUM returns the space occupied by dead tuples to the operating system.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T15-L7 · PostgreSQL
Which keyword in a window function definition partitions rows into groups the function is computed over?
Верный ответ: partition by
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T15-L8 · PostgreSQL
The READ COMMITTED isolation level protects against non-repeatable reads.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T15-L9 · PostgreSQL
What does this SQL query return (PostgreSQL 17)?
```sql
CREATE TEMP TABLE t (id int, x int);
INSERT INTO t VALUES (1, 10), (2, 20), (3, 30);
SELECT string_agg(s::text, ',' ORDER BY id) FROM (
SELECT id, sum(x) OVER (ORDER BY id) AS s FROM t
) q;
```
Верный ответ: 10,30,60
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T15-L10 · PostgreSQL
What does this SQL query return (PostgreSQL 17)?
```sql
CREATE TEMP TABLE t (x int);
INSERT INTO t VALUES (1), (NULL);
SELECT count(x) FROM t;
```
Верный ответ: 1
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
92.0%
100
T15-L1 · PostgreSQL
PostgreSQL uses MVCC, therefore readers block writers and writers block readers.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T15-L2 · PostgreSQL
Which SQL command shows a query's execution plan without executing the query?
Верный ответ: explain
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T15-L3 · PostgreSQL
SERIAL and GENERATED ... AS IDENTITY are just two names for the same mechanism.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T15-L4 · PostgreSQL
By default, a PostgreSQL UNIQUE constraint allows only one row with NULL in the column.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T15-L5 · PostgreSQL
Which PostgreSQL aggregate function concatenates strings with a separator?
Верный ответ: string_agg
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T15-L6 · PostgreSQL
Plain VACUUM returns the space occupied by dead tuples to the operating system.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
60
T15-L7 · PostgreSQL
Which keyword in a window function definition partitions rows into groups the function is computed over?
Верный ответ: partition by
run-77: ✓ · run-78: ✗ · run-79: ✓ · run-80: ✓ · run-81: ✗
100
T15-L8 · PostgreSQL
The READ COMMITTED isolation level protects against non-repeatable reads.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T15-L9 · PostgreSQL
What does this SQL query return (PostgreSQL 17)?
```sql
CREATE TEMP TABLE t (id int, x int);
INSERT INTO t VALUES (1, 10), (2, 20), (3, 30);
SELECT string_agg(s::text, ',' ORDER BY id) FROM (
SELECT id, sum(x) OVER (ORDER BY id) AS s FROM t
) q;
```
Верный ответ: 10,30,60
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T15-L10 · PostgreSQL
What does this SQL query return (PostgreSQL 17)?
```sql
CREATE TEMP TABLE t (x int);
INSERT INTO t VALUES (1), (NULL);
SELECT count(x) FROM t;
```
Верный ответ: 1
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
96.0%
100
T15-L1 · PostgreSQL
PostgreSQL uses MVCC, therefore readers block writers and writers block readers.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T15-L2 · PostgreSQL
Which SQL command shows a query's execution plan without executing the query?
Верный ответ: explain
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T15-L3 · PostgreSQL
SERIAL and GENERATED ... AS IDENTITY are just two names for the same mechanism.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T15-L4 · PostgreSQL
By default, a PostgreSQL UNIQUE constraint allows only one row with NULL in the column.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T15-L5 · PostgreSQL
Which PostgreSQL aggregate function concatenates strings with a separator?
Верный ответ: string_agg
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T15-L6 · PostgreSQL
Plain VACUUM returns the space occupied by dead tuples to the operating system.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T15-L7 · PostgreSQL
Which keyword in a window function definition partitions rows into groups the function is computed over?
Верный ответ: partition by
run-100: ✗ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T15-L8 · PostgreSQL
The READ COMMITTED isolation level protects against non-repeatable reads.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T15-L9 · PostgreSQL
What does this SQL query return (PostgreSQL 17)?
```sql
CREATE TEMP TABLE t (id int, x int);
INSERT INTO t VALUES (1, 10), (2, 20), (3, 30);
SELECT string_agg(s::text, ',' ORDER BY id) FROM (
SELECT id, sum(x) OVER (ORDER BY id) AS s FROM t
) q;
```
Верный ответ: 10,30,60
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T15-L10 · PostgreSQL
What does this SQL query return (PostgreSQL 17)?
```sql
CREATE TEMP TABLE t (x int);
INSERT INTO t VALUES (1), (NULL);
SELECT count(x) FROM t;
```
Верный ответ: 1
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
98.0%
PostgreSQL: transactions and indexes
100
T17-L1 · PostgreSQL: transactions and indexes
By default, PostgreSQL wraps each single SQL statement in its own implicit transaction (autocommit).
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T17-L2 · PostgreSQL: transactions and indexes
Which SQL command ends a transaction, committing all its changes?
Верный ответ: commit
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T17-L3 · PostgreSQL: transactions and indexes
Indexes speed up more than SELECT: UPDATE and DELETE with a search on an indexed column benefit too.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T17-L4 · PostgreSQL: transactions and indexes
To roll back part of the statements inside a transaction, PostgreSQL uses SAVEPOINT.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T17-L5 · PostgreSQL: transactions and indexes
EXPLAIN ANALYZE shows the query plan without executing the query.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T17-L6 · PostgreSQL: transactions and indexes
Which PostgreSQL extension adds vector types and indexes for embedding search?
Верный ответ: vector
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T17-L7 · PostgreSQL: transactions and indexes
A partial index (CREATE INDEX ... WHERE ...) is built only over rows satisfying the condition.
Верный ответ: yes
run-72: ✗ · run-73: ✗ · run-74: ✗ · run-75: ✓ · run-76: ✗
80
T17-L8 · PostgreSQL: transactions and indexes
The SERIALIZABLE level in PostgreSQL is implemented by locking the rows a transaction reads.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T17-L9 · PostgreSQL: transactions and indexes
What does this SQL query return (PostgreSQL 17)?
```sql
CREATE TEMP TABLE t (a int);
CREATE UNIQUE INDEX ON t (a);
INSERT INTO t VALUES (1) ON CONFLICT DO NOTHING;
INSERT INTO t VALUES (1) ON CONFLICT DO NOTHING;
SELECT count(*) FROM t;
```
Верный ответ: 1
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T17-L10 · PostgreSQL: transactions and indexes
What does this sequence of psql commands output?
```sql
BEGIN;
CREATE TEMP TABLE t (a int, UNIQUE (a) DEFERRABLE INITIALLY DEFERRED);
INSERT INTO t VALUES (1);
INSERT INTO t VALUES (1);
SELECT count(*) FROM t;
```
Верный ответ: 2
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
90.0%
100
T17-L1 · PostgreSQL: transactions and indexes
By default, PostgreSQL wraps each single SQL statement in its own implicit transaction (autocommit).
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T17-L2 · PostgreSQL: transactions and indexes
Which SQL command ends a transaction, committing all its changes?
Верный ответ: commit
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T17-L3 · PostgreSQL: transactions and indexes
Indexes speed up more than SELECT: UPDATE and DELETE with a search on an indexed column benefit too.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T17-L4 · PostgreSQL: transactions and indexes
To roll back part of the statements inside a transaction, PostgreSQL uses SAVEPOINT.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T17-L5 · PostgreSQL: transactions and indexes
EXPLAIN ANALYZE shows the query plan without executing the query.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T17-L6 · PostgreSQL: transactions and indexes
Which PostgreSQL extension adds vector types and indexes for embedding search?
Верный ответ: vector
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T17-L7 · PostgreSQL: transactions and indexes
A partial index (CREATE INDEX ... WHERE ...) is built only over rows satisfying the condition.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T17-L8 · PostgreSQL: transactions and indexes
The SERIALIZABLE level in PostgreSQL is implemented by locking the rows a transaction reads.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T17-L9 · PostgreSQL: transactions and indexes
What does this SQL query return (PostgreSQL 17)?
```sql
CREATE TEMP TABLE t (a int);
CREATE UNIQUE INDEX ON t (a);
INSERT INTO t VALUES (1) ON CONFLICT DO NOTHING;
INSERT INTO t VALUES (1) ON CONFLICT DO NOTHING;
SELECT count(*) FROM t;
```
Верный ответ: 1
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T17-L10 · PostgreSQL: transactions and indexes
What does this sequence of psql commands output?
```sql
BEGIN;
CREATE TEMP TABLE t (a int, UNIQUE (a) DEFERRABLE INITIALLY DEFERRED);
INSERT INTO t VALUES (1);
INSERT INTO t VALUES (1);
SELECT count(*) FROM t;
```
Верный ответ: 2
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100.0%
100
T17-L1 · PostgreSQL: transactions and indexes
By default, PostgreSQL wraps each single SQL statement in its own implicit transaction (autocommit).
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T17-L2 · PostgreSQL: transactions and indexes
Which SQL command ends a transaction, committing all its changes?
Верный ответ: commit
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T17-L3 · PostgreSQL: transactions and indexes
Indexes speed up more than SELECT: UPDATE and DELETE with a search on an indexed column benefit too.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T17-L4 · PostgreSQL: transactions and indexes
To roll back part of the statements inside a transaction, PostgreSQL uses SAVEPOINT.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T17-L5 · PostgreSQL: transactions and indexes
EXPLAIN ANALYZE shows the query plan without executing the query.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T17-L6 · PostgreSQL: transactions and indexes
Which PostgreSQL extension adds vector types and indexes for embedding search?
Верный ответ: vector
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T17-L7 · PostgreSQL: transactions and indexes
A partial index (CREATE INDEX ... WHERE ...) is built only over rows satisfying the condition.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T17-L8 · PostgreSQL: transactions and indexes
The SERIALIZABLE level in PostgreSQL is implemented by locking the rows a transaction reads.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T17-L9 · PostgreSQL: transactions and indexes
What does this SQL query return (PostgreSQL 17)?
```sql
CREATE TEMP TABLE t (a int);
CREATE UNIQUE INDEX ON t (a);
INSERT INTO t VALUES (1) ON CONFLICT DO NOTHING;
INSERT INTO t VALUES (1) ON CONFLICT DO NOTHING;
SELECT count(*) FROM t;
```
Верный ответ: 1
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T17-L10 · PostgreSQL: transactions and indexes
What does this sequence of psql commands output?
```sql
BEGIN;
CREATE TEMP TABLE t (a int, UNIQUE (a) DEFERRABLE INITIALLY DEFERRED);
INSERT INTO t VALUES (1);
INSERT INTO t VALUES (1);
SELECT count(*) FROM t;
```
Верный ответ: 2
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100.0%
HTTP and REST API
100
T19-L1 · HTTP and REST API
HTTP status 201 means the request resulted in a new resource being created.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T19-L2 · HTTP and REST API
Which HTTP status means a successful request with an empty response body (e.g. after DELETE)?
Верный ответ: 204
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T19-L3 · HTTP and REST API
The DELETE method is idempotent per the HTTP specification: repeating the request for the same resource does not change the outcome.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✗ · run-75: ✓ · run-76: ✓
100
T19-L4 · HTTP and REST API
The Access-Control-Allow-Origin header is sent by the client so that the server agrees to accept requests from another origin.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T19-L5 · HTTP and REST API
Status 429 Too Many Requests is used when a client exceeds a rate limit.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T19-L6 · HTTP and REST API
5xx codes mean a client error, while 4xx means a server-side error.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T19-L7 · HTTP and REST API
Which HTTP header indicates the MIME type of the request or response body?
Верный ответ: content-type
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T19-L8 · HTTP and REST API
PATCH is not required to be idempotent per RFC 5789, unlike PUT.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T19-L9 · HTTP and REST API
Which HTTP method does this command send?
```bash
curl -s -d 'a=1' http://demo.local/api
```
Верный ответ: post
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T19-L10 · HTTP and REST API
Which HTTP method does this command send?
```bash
curl -s -G -d 'a=1' http://demo.local/api
```
Верный ответ: get
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
98.0%
100
T19-L1 · HTTP and REST API
HTTP status 201 means the request resulted in a new resource being created.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T19-L2 · HTTP and REST API
Which HTTP status means a successful request with an empty response body (e.g. after DELETE)?
Верный ответ: 204
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
60
T19-L3 · HTTP and REST API
The DELETE method is idempotent per the HTTP specification: repeating the request for the same resource does not change the outcome.
Верный ответ: yes
run-77: ✗ · run-78: ✓ · run-79: ✗ · run-80: ✓ · run-81: ✓
100
T19-L4 · HTTP and REST API
The Access-Control-Allow-Origin header is sent by the client so that the server agrees to accept requests from another origin.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T19-L5 · HTTP and REST API
Status 429 Too Many Requests is used when a client exceeds a rate limit.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T19-L6 · HTTP and REST API
5xx codes mean a client error, while 4xx means a server-side error.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T19-L7 · HTTP and REST API
Which HTTP header indicates the MIME type of the request or response body?
Верный ответ: content-type
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T19-L8 · HTTP and REST API
PATCH is not required to be idempotent per RFC 5789, unlike PUT.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T19-L9 · HTTP and REST API
Which HTTP method does this command send?
```bash
curl -s -d 'a=1' http://demo.local/api
```
Верный ответ: post
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T19-L10 · HTTP and REST API
Which HTTP method does this command send?
```bash
curl -s -G -d 'a=1' http://demo.local/api
```
Верный ответ: get
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
96.0%
100
T19-L1 · HTTP and REST API
HTTP status 201 means the request resulted in a new resource being created.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T19-L2 · HTTP and REST API
Which HTTP status means a successful request with an empty response body (e.g. after DELETE)?
Верный ответ: 204
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T19-L3 · HTTP and REST API
The DELETE method is idempotent per the HTTP specification: repeating the request for the same resource does not change the outcome.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T19-L4 · HTTP and REST API
The Access-Control-Allow-Origin header is sent by the client so that the server agrees to accept requests from another origin.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T19-L5 · HTTP and REST API
Status 429 Too Many Requests is used when a client exceeds a rate limit.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T19-L6 · HTTP and REST API
5xx codes mean a client error, while 4xx means a server-side error.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T19-L7 · HTTP and REST API
Which HTTP header indicates the MIME type of the request or response body?
Верный ответ: content-type
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T19-L8 · HTTP and REST API
PATCH is not required to be idempotent per RFC 5789, unlike PUT.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T19-L9 · HTTP and REST API
Which HTTP method does this command send?
```bash
curl -s -d 'a=1' http://demo.local/api
```
Верный ответ: post
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T19-L10 · HTTP and REST API
Which HTTP method does this command send?
```bash
curl -s -G -d 'a=1' http://demo.local/api
```
Верный ответ: get
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100.0%
Security and OAuth
100
T20-L1 · Security and OAuth
Checking a password by comparing its hash to the stored hash with a plain == is sufficient.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T20-L2 · Security and OAuth
A CSRF token is issued by the server (bound to the session) and verified server-side on unsafe requests (POST etc.).
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T20-L3 · Security and OAuth
Which HTTP header enables the CSP (Content Security Policy) policy?
Верный ответ: content-security-policy
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T20-L4 · Security and OAuth
OAuth 2.0 is an authentication protocol: the access token tells you who the user is.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T20-L5 · Security and OAuth
XSS is prevented by validating input on the server before writing it to the database.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T20-L6 · Security and OAuth
In the OAuth 2.0 authorization code flow, which parameter arrives at the redirect_uri and is exchanged for an access token?
Верный ответ: code
run-72: ✓ · run-73: ✗ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T20-L7 · Security and OAuth
A refresh token lives longer than an access token and allows obtaining a new access token without the user logging in again.
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T20-L8 · Security and OAuth
A password salt must be kept secret: without it the hash cannot be verified.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
80
T20-L9 · Security and OAuth
A client hits the token endpoint (RFC 6749) with a non-existent client_id. What value of the error field does the endpoint return?
Верный ответ: invalid_client
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✗
100
T20-L10 · Security and OAuth
OAuth 2.0: the client started the flow with response_type=token. In which part of the redirect_uri does the authorization server pass the access_token?
Верный ответ: fragment
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
96.0%
100
T20-L1 · Security and OAuth
Checking a password by comparing its hash to the stored hash with a plain == is sufficient.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T20-L2 · Security and OAuth
A CSRF token is issued by the server (bound to the session) and verified server-side on unsafe requests (POST etc.).
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T20-L3 · Security and OAuth
Which HTTP header enables the CSP (Content Security Policy) policy?
Верный ответ: content-security-policy
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T20-L4 · Security and OAuth
OAuth 2.0 is an authentication protocol: the access token tells you who the user is.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T20-L5 · Security and OAuth
XSS is prevented by validating input on the server before writing it to the database.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
80
T20-L6 · Security and OAuth
In the OAuth 2.0 authorization code flow, which parameter arrives at the redirect_uri and is exchanged for an access token?
Верный ответ: code
run-77: ✓ · run-78: ✗ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T20-L7 · Security and OAuth
A refresh token lives longer than an access token and allows obtaining a new access token without the user logging in again.
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T20-L8 · Security and OAuth
A password salt must be kept secret: without it the hash cannot be verified.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
60
T20-L9 · Security and OAuth
A client hits the token endpoint (RFC 6749) with a non-existent client_id. What value of the error field does the endpoint return?
Верный ответ: invalid_client
run-77: ✗ · run-78: ✓ · run-79: ✓ · run-80: ✗ · run-81: ✓
100
T20-L10 · Security and OAuth
OAuth 2.0: the client started the flow with response_type=token. In which part of the redirect_uri does the authorization server pass the access_token?
Верный ответ: fragment
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
94.0%
100
T20-L1 · Security and OAuth
Checking a password by comparing its hash to the stored hash with a plain == is sufficient.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T20-L2 · Security and OAuth
A CSRF token is issued by the server (bound to the session) and verified server-side on unsafe requests (POST etc.).
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T20-L3 · Security and OAuth
Which HTTP header enables the CSP (Content Security Policy) policy?
Верный ответ: content-security-policy
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T20-L4 · Security and OAuth
OAuth 2.0 is an authentication protocol: the access token tells you who the user is.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T20-L5 · Security and OAuth
XSS is prevented by validating input on the server before writing it to the database.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T20-L6 · Security and OAuth
In the OAuth 2.0 authorization code flow, which parameter arrives at the redirect_uri and is exchanged for an access token?
Верный ответ: code
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T20-L7 · Security and OAuth
A refresh token lives longer than an access token and allows obtaining a new access token without the user logging in again.
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T20-L8 · Security and OAuth
A password salt must be kept secret: without it the hash cannot be verified.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
80
T20-L9 · Security and OAuth
A client hits the token endpoint (RFC 6749) with a non-existent client_id. What value of the error field does the endpoint return?
Верный ответ: invalid_client
run-100: ✗ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T20-L10 · Security and OAuth
OAuth 2.0: the client started the flow with response_type=token. In which part of the redirect_uri does the authorization server pass the access_token?
Верный ответ: fragment
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
98.0%
Testing: PHPUnit
100
T18-L1 · Testing: PHPUnit
PHPUnit runs test methods of any class — extending TestCase is not required.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T18-L2 · Testing: PHPUnit
In PHPUnit, setUp() runs once before all tests of the class.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T18-L3 · Testing: PHPUnit
A data provider lets a test run with exactly one set of arguments.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T18-L4 · Testing: PHPUnit
Which PHPUnit method declares an expectation that an exception of a given class is thrown?
Верный ответ: expectexception
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T18-L5 · Testing: PHPUnit
In PHPUnit, a stub verifies which methods were called on it, while a mock only returns data.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T18-L6 · Testing: PHPUnit
In PHPUnit 10+, the recommended way to pass data to a test is the #[DataProvider] attribute (the @dataProvider annotation is deprecated).
Верный ответ: yes
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
100
T18-L7 · Testing: PHPUnit
PHPUnit does not allow one test to depend on the result of another.
Верный ответ: no
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
20
T18-L8 · Testing: PHPUnit
Which PHPUnit command-line option makes tests run in random order?
Верный ответ: --order-by=random
run-72: ✗ · run-73: ✗ · run-74: ✓ · run-75: ✗ · run-76: ✗
20
T18-L9 · Testing: PHPUnit
How many tests will this command run?
```php
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\DataProvider;
final class CalcTest extends TestCase
{
public static function prov(): array
{
return [[1], [2], [3]];
}
#[DataProvider('prov')]
public function test_sum(int $x): void
{
$this->assertTrue($x > 0);
}
#[DataProvider('prov')]
public function test_sum_abs(int $x): void
{
$this->assertTrue($x > 0);
}
public function test_other(): void
{
$this->assertTrue(true);
}
}
```
Command: `phpunit CalcTest.php --filter test_sum` (PHPUnit 10.5)
Верный ответ: 6
run-72: ✗ · run-73: ✓ · run-74: ✗ · run-75: ✗ · run-76: ✗
100
T18-L10 · Testing: PHPUnit
How many tests will this command run, and how many of them will fail? Answer with two comma-separated numbers (ran, failed).
```php
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\DataProvider;
final class Calc2Test extends TestCase
{
public function prov(): array
{
return [[1], [-1]];
}
#[DataProvider('prov')]
public function test_x(int $x): void
{
$this->assertTrue($x > 0);
}
}
```
Command: `phpunit Calc2Test.php` (PHPUnit 10.5)
Верный ответ: 2,1
run-72: ✓ · run-73: ✓ · run-74: ✓ · run-75: ✓ · run-76: ✓
84.0%
100
T18-L1 · Testing: PHPUnit
PHPUnit runs test methods of any class — extending TestCase is not required.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T18-L2 · Testing: PHPUnit
In PHPUnit, setUp() runs once before all tests of the class.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T18-L3 · Testing: PHPUnit
A data provider lets a test run with exactly one set of arguments.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T18-L4 · Testing: PHPUnit
Which PHPUnit method declares an expectation that an exception of a given class is thrown?
Верный ответ: expectexception
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T18-L5 · Testing: PHPUnit
In PHPUnit, a stub verifies which methods were called on it, while a mock only returns data.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T18-L6 · Testing: PHPUnit
In PHPUnit 10+, the recommended way to pass data to a test is the #[DataProvider] attribute (the @dataProvider annotation is deprecated).
Верный ответ: yes
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T18-L7 · Testing: PHPUnit
PHPUnit does not allow one test to depend on the result of another.
Верный ответ: no
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
60
T18-L8 · Testing: PHPUnit
Which PHPUnit command-line option makes tests run in random order?
Верный ответ: --order-by=random
run-77: ✓ · run-78: ✓ · run-79: ✗ · run-80: ✓ · run-81: ✗
100
T18-L9 · Testing: PHPUnit
How many tests will this command run?
```php
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\DataProvider;
final class CalcTest extends TestCase
{
public static function prov(): array
{
return [[1], [2], [3]];
}
#[DataProvider('prov')]
public function test_sum(int $x): void
{
$this->assertTrue($x > 0);
}
#[DataProvider('prov')]
public function test_sum_abs(int $x): void
{
$this->assertTrue($x > 0);
}
public function test_other(): void
{
$this->assertTrue(true);
}
}
```
Command: `phpunit CalcTest.php --filter test_sum` (PHPUnit 10.5)
Верный ответ: 6
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
100
T18-L10 · Testing: PHPUnit
How many tests will this command run, and how many of them will fail? Answer with two comma-separated numbers (ran, failed).
```php
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\DataProvider;
final class Calc2Test extends TestCase
{
public function prov(): array
{
return [[1], [-1]];
}
#[DataProvider('prov')]
public function test_x(int $x): void
{
$this->assertTrue($x > 0);
}
}
```
Command: `phpunit Calc2Test.php` (PHPUnit 10.5)
Верный ответ: 2,1
run-77: ✓ · run-78: ✓ · run-79: ✓ · run-80: ✓ · run-81: ✓
96.0%
100
T18-L1 · Testing: PHPUnit
PHPUnit runs test methods of any class — extending TestCase is not required.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T18-L2 · Testing: PHPUnit
In PHPUnit, setUp() runs once before all tests of the class.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T18-L3 · Testing: PHPUnit
A data provider lets a test run with exactly one set of arguments.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T18-L4 · Testing: PHPUnit
Which PHPUnit method declares an expectation that an exception of a given class is thrown?
Верный ответ: expectexception
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T18-L5 · Testing: PHPUnit
In PHPUnit, a stub verifies which methods were called on it, while a mock only returns data.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T18-L6 · Testing: PHPUnit
In PHPUnit 10+, the recommended way to pass data to a test is the #[DataProvider] attribute (the @dataProvider annotation is deprecated).
Верный ответ: yes
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T18-L7 · Testing: PHPUnit
PHPUnit does not allow one test to depend on the result of another.
Верный ответ: no
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
20
T18-L8 · Testing: PHPUnit
Which PHPUnit command-line option makes tests run in random order?
Верный ответ: --order-by=random
run-100: ✗ · run-101: ✗ · run-97: ✗ · run-98: ✗ · run-99: ✓
100
T18-L9 · Testing: PHPUnit
How many tests will this command run?
```php
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\DataProvider;
final class CalcTest extends TestCase
{
public static function prov(): array
{
return [[1], [2], [3]];
}
#[DataProvider('prov')]
public function test_sum(int $x): void
{
$this->assertTrue($x > 0);
}
#[DataProvider('prov')]
public function test_sum_abs(int $x): void
{
$this->assertTrue($x > 0);
}
public function test_other(): void
{
$this->assertTrue(true);
}
}
```
Command: `phpunit CalcTest.php --filter test_sum` (PHPUnit 10.5)
Верный ответ: 6
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
100
T18-L10 · Testing: PHPUnit
How many tests will this command run, and how many of them will fail? Answer with two comma-separated numbers (ran, failed).
```php
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\DataProvider;
final class Calc2Test extends TestCase
{
public function prov(): array
{
return [[1], [-1]];
}
#[DataProvider('prov')]
public function test_x(int $x): void
{
$this->assertTrue($x > 0);
}
}
```
Command: `phpunit Calc2Test.php` (PHPUnit 10.5)
Верный ответ: 2,1
run-100: ✓ · run-101: ✓ · run-97: ✓ · run-98: ✓ · run-99: ✓
92.0%