Карта знаний PHP — qwen3.8:latest: 5 прогонов

тепловая карта: клетка = доля верных ответов по прогонам (0% красная → 100% зелёная, число внутри — % верных); пунктир — нестабильная клетка (флип: ответы прогонов не совпали); протокол клетки как в одиночной карте.

Прогонов: 5
Средняя точность: 91.7% (разброс 216–222 из 240)
Семейства: PHP 97.1% · PHP+версии 90.2% · Symfony 95.0% · Symfony+версии 92.9% · БД и ORM 95.0% · Архитектура 88.8% · Фронтенд 90.0% · HTTP 97.5% · Безопасность 100.0% · Тесты 90.0% · Глубина 86.8% · Всего 91.7%
Токены по всем прогонам: 230220 вх / 322927 вых
Флипующих клеток: 40 / 240
Разобрано JSON: 99.8% (не-JSON: 3 из 1480)
Стабильность = доля клеток, где все прогоны ответили одинаково; флип (ответы расходятся) — знание под вопросом

Тепловая карта

0% верных 50% 100% флип (ответы прогонов расходятся)
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T01-L2 · Syntax and operators
The ?? operator follows isset semantics and raises no warnings for undefined variables.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T01-L3 · Syntax and operators
What will this print: echo 'a', 'b';
Верный ответ: ab
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
60
T01-L4 · Syntax and operators
print returns the value 1 and can be used inside an expression.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✗
100
T01-L5 · Syntax and operators
The ?: (elvis) operator returns its left operand when it is falsy.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T01-L6 · Syntax and operators
In PHP 8, the concatenation operator (.) has lower precedence than addition and subtraction.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T01-L7 · Syntax and operators
The expression 2 ** 3 ** 2 in PHP evaluates as (2 ** 3) ** 2, that is, 64.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
40
T01-L8 · Syntax and operators
What string will this print: echo 'sum: ' . 2 + 3; (PHP 8)?
Верный ответ: sum: 5
run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✗
80
T01-L9 · Syntax and operators
What does this code output? ```php echo intdiv(7, 2) . intdiv(-7, 2); ```
Верный ответ: 3-3
run-21: ✓ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T01-L10 · Syntax and operators
What does this code output? ```php echo -3 ** 2; ```
Верный ответ: -9
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
88.0%
Types and comparisons
100
T02-L1 · Types and comparisons
With strict comparison (===), arrays are considered equal regardless of element order.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T02-L2 · Types and comparisons
The comparison 0 == false returns false because it is a strict comparison.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T02-L3 · Types and comparisons
In PHP 8, the expression "abc" == 0 returns true.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
T02-L4 · Types and comparisons
Under loose comparison, null equals 0, the empty string, and false at the same time.
Верный ответ: yes
run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T02-L5 · Types and comparisons
What does the expression (int) '42abc' return?
Верный ответ: 42
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T02-L6 · Types and comparisons
What does the expression '5' + 5 return?
Верный ответ: 10
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
T02-L7 · Types and comparisons
When cast to string, false becomes "0".
Верный ответ: no
run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T02-L8 · Types and comparisons
The comparison 0.1 + 0.2 === 0.3 returns false.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
60
T02-L9 · Types and comparisons
What does this code output? ```php echo '1e1' == '10' ? 'true' : 'false'; ```
Верный ответ: true
run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✓
60
T02-L10 · Types and comparisons
What does this code output? ```php switch ('a') { case 0: echo 'zero'; break; default: echo 'other'; } ```
Верный ответ: other
run-21: ✗ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓
88.0%
Strings
100
T03-L1 · Strings
strrev() correctly reverses a UTF-8 string.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T03-L2 · Strings
str_contains('Hello world', 'world') returns true.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T03-L3 · Strings
str_pad() can pad a string on the right side only.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T03-L4 · Strings
By default trim() strips only spaces, leaving tabs and newlines intact.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T03-L5 · Strings
How many BYTES does strlen('héllo') return for a UTF-8 string?
Верный ответ: 6
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T03-L6 · Strings
What does substr('abcdef', -3) return?
Верный ответ: def
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T03-L7 · Strings
ucfirst() modifies the string passed to it in place.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T03-L8 · Strings
Variable interpolation works in heredoc but not in nowdoc.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T03-L9 · Strings
What does this code output? ```php echo strtr('abc', ['a' => '1', 'ab' => '2']); ```
Верный ответ: 2c
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
0
T03-L10 · Strings
What does this code output? ```php echo '[' . substr('hello', -10) . ']'; ```
Верный ответ: [hello]
run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
90.0%
Arrays
100
T04-L1 · Arrays
The sort() function preserves the key-to-value association of the array.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T04-L2 · Arrays
The string key '5' in an array is stored as the integer 5.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T04-L3 · Arrays
The in_array() function uses strict comparison (===) by default.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T04-L4 · Arrays
Without a callback, array_filter() removes all "empty" (falsy) elements from the array.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T04-L5 · Arrays
By default, array_slice() preserves the original numeric keys of the array.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T04-L6 · Arrays
What does array_slice([10, 20, 30, 40], 1, 2) return?
Верный ответ: [20,30]
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T04-L7 · Arrays
How many elements will count(['a' => 1] + ['a' => 9, 'b' => 2]) return?
Верный ответ: 2
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T04-L8 · Arrays
Since PHP 8.1, the spread operator [...$a, ...$b] supports arrays with string keys.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗
98.0%
Functions and closures
100
T05-L1 · Functions and closures
Named arguments cannot be combined with argument unpacking ...$args in a single call.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T05-L2 · Functions and closures
An anonymous function without use sees variables from the outer scope.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T05-L4 · Functions and closures
The body of an arrow function fn may consist of several expressions in curly braces.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T05-L5 · Functions and closures
An arrow function fn captures outer variables by reference (lazily, at use time).
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T05-L6 · Functions and closures
A closure declared as static function () {} does not capture $this.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T05-L7 · Functions and closures
What will this print: $x = 5; $f = function () use ($x) { return $x; }; $x = 7; echo $f();
Верный ответ: 5
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100.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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T06-L2 · OOP: classes and inheritance
Which keyword prevents a method from being overridden in subclasses?
Верный ответ: final
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T06-L3 · OOP: classes and inheritance
A method declared final cannot be overridden in a subclass.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T06-L4 · OOP: classes and inheritance
Parent properties with private visibility are accessible in a subclass.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
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-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T06-L7 · OOP: classes and inheritance
The magic method __get() is called only for non-existent properties.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T06-L8 · OOP: classes and inheritance
What does reassigning a readonly property throw — Exception or Error?
Верный ответ: error
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
60
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-21: ✗ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓
94.0%
Interfaces, traits, enum
100
T07-L1 · Interfaces, traits, enum
An interface can declare constants.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T07-L2 · Interfaces, traits, enum
Which operator checks whether an object is an instance of a class or interface?
Верный ответ: instanceof
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
40
T07-L3 · Interfaces, traits, enum
An interface can declare static methods.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✗ · run-25: ✗
100
T07-L4 · Interfaces, traits, enum
The instanceof operator only checks class inheritance: it ignores interfaces.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T07-L5 · Interfaces, traits, enum
An interface method may have a default implementation, like a trait method.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T07-L6 · Interfaces, traits, enum
An abstract method in an abstract class may have protected visibility.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T07-L7 · Interfaces, traits, enum
How many elements will Foo::cases() return for enum Foo { case A; case B; case C; }?
Верный ответ: 3
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T07-L8 · Interfaces, traits, enum
A trait can declare constants.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
94.0%
Exceptions and errors
100
T08-L1 · Exceptions and errors
The Throwable interface is a common ancestor of both Exception and Error.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T08-L2 · Exceptions and errors
A catch (Exception $e) block will also catch TypeError, because TypeError ultimately inherits from Exception.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T08-L3 · Exceptions and errors
The @ operator suppresses exceptions too.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T08-L4 · Exceptions and errors
What error class does intdiv(5, 0) throw?
Верный ответ: divisionbyzeroerror
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T08-L5 · Exceptions and errors
The finally block runs only if the exception was caught by a catch block.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T08-L7 · Exceptions and errors
What does the expression (bool) new Exception('x') return?
Верный ответ: true
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T08-L8 · Exceptions and errors
Functions registered via register_shutdown_function() run when exit is called.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100.0%
Namespaces and autoloading
100
T09-L1 · Namespaces and autoloading
The use App\Service\Mailer; statement itself loads the class file.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T09-L2 · Namespaces and autoloading
What follows use to import a function (not a class): the word function or const?
Верный ответ: function
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T09-L4 · Namespaces and autoloading
Including vendor/autoload.php registers autoloaders via spl_autoload_register().
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T09-L5 · Namespaces and autoloading
The magic constant __NAMESPACE__ contains the name of the current namespace.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T09-L6 · Namespaces and autoloading
An unqualified class name (without a leading \) in new is resolved from the global root.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
60
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-21: ✓ · run-22: ✗ · run-23: ✗ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
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-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓
94.0%
References and scope
100
T10-L1 · References and scope
Arrays are copied on assignment rather than passed by reference.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T10-L2 · References and scope
What will this print: $a = [1, 2]; $b = $a; $b[] = 3; echo count($a);
Верный ответ: 2
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T10-L4 · References and scope
unset($GLOBALS['x']) inside a function removes the global variable only for that function.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T10-L5 · References and scope
What will this print: function inc(&$x) { $x++; } $n = 5; inc($n); echo $n;
Верный ответ: 6
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T10-L8 · References and scope
An array can have a boolean key true, and it will be stored as bool.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100.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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T11-L2 · Generators, iterators, SPL
A fully consumed generator can be rewound with rewind() and traversed again.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
T11-L3 · Generators, iterators, SPL
The yield from construct delegates traversal to another generator or iterable.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗
100
T11-L4 · Generators, iterators, SPL
What does get_class(g()) return for function g() { yield 1; }?
Верный ответ: generator
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T11-L5 · Generators, iterators, SPL
How many elements will count(iterator_to_array((function () { yield from [1, 2, 3]; })())) return?
Верный ответ: 3
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T11-L6 · Generators, iterators, SPL
The SplStack class implements a FIFO queue.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T11-L7 · Generators, iterators, SPL
ArrayIterator allows wrapping an array and traversing it via the Iterator interface.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T11-L8 · Generators, iterators, SPL
An ArrayObject instance cannot be traversed with foreach.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
60
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-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗
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-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
84.0%
Configuration and security
100
T12-L1 · Configuration and security
password_hash() generates a salt automatically — passing one separately is not needed.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T12-L2 · Configuration and security
In PHP 8, PASSWORD_DEFAULT is md5 with an automatically added salt.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T12-L3 · Configuration and security
What does password_verify('secret', password_hash('secret', PASSWORD_DEFAULT)) return?
Верный ответ: true
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T12-L4 · Configuration and security
strip_tags() protects against SQL injection.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T12-L5 · Configuration and security
session_regenerate_id() is used to protect against session fixation upon user login.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T12-L6 · Configuration and security
Which built-in function returns the SAPI name (e.g., cli)?
Верный ответ: php_sapi_name
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T12-L8 · Configuration and security
Without calling session_start(), the $_SESSION array is automatically populated with session data.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗
98.0%
PHP 8.4–8.5
20
VC-L1 · PHP 8.4–8.5
In which PHP version was the array_find() function introduced?
Верный ответ: 8.4
run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✓ · run-25: ✗
100
VC-L2 · PHP 8.4–8.5
Property hooks (get/set right in the property declaration) landed in PHP 8.4.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
VC-L3 · PHP 8.4–8.5
Asymmetric visibility (public private(set) string $name) appeared in PHP 8.4.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
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-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
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-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
0
VC-L7 · PHP 8.4–8.5
In which PHP version were the array_first() and array_last() functions introduced?
Верный ответ: 8.5
run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
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-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
42.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-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
100
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
60
VF-L3 · PHP: 8.6+ and the future
RFC Bound-Erased Generic Types (generics) was declined in 2026.
Верный ответ: yes
run-21: ✗ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
VF-L5 · PHP: 8.6+ and the future
As of PHP 8.5, generics (parameterized types) are still absent.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
0
VF-L8 · PHP: 8.6+ and the future
The RFC adding the #[\Deprecated] attribute to the core was adopted.
Верный ответ: yes
run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T25-L2 · Clean architecture
Domain entities import neither Doctrine nor Symfony — only the language and, possibly, the standard library.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
0
T25-L4 · Clean architecture
What sits at the very center of the onion architecture?
Верный ответ: domain model
run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
90.0%
DDD
100
T26-L1 · DDD
In DDD, an aggregate is just another name for a database table.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T26-L2 · DDD
A Value Object is immutable and compared by the values of its fields, not by identity.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T26-L3 · DDD
What is the single external entry point of an aggregate, through which all changes must go, called?
Верный ответ: aggregate root
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T26-L4 · DDD
In DDD, a repository is declared for an aggregate (its root), not for every entity.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T26-L5 · DDD
Ubiquitous language is the model's shared language common to developers and domain experts.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✗ · run-22: ✓ · run-23: ✗ · run-24: ✗ · run-25: ✗
100
T26-L7 · DDD
An anemic model (objects with only getters/setters, logic in services) is the recommended DDD style.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
92.0%
Symfony
100
T13-L1 · Symfony
Services in the Symfony DI container are created lazily by default — on first use.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
T13-L2 · Symfony
Which Symfony console command lists all registered routes?
Верный ответ: debug:router
run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T13-L3 · Symfony
Symfony autowiring requires manually declaring every service in services.yaml.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T13-L4 · Symfony
Twig templates are compiled into PHP classes and cached between requests.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T13-L6 · Symfony
Which environment variable selects the active Symfony environment (dev/prod)?
Верный ответ: app_env
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T13-L7 · Symfony
A controller method can be private — Symfony routing works with any method of the class.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T13-L8 · Symfony
Event subscribers always receive events before listeners, because the interface gives them priority.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
98.0%
Symfony: Security and forms
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T22-L2 · Symfony: Security and forms
Which Symfony attribute checks a role/permission right on a controller method (403 without it)?
Верный ответ: isgranted
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T22-L3 · Symfony: Security and forms
Voters are Symfony's mechanism for checking access to a specific object: isGranted('EDIT', $post).
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T22-L6 · Symfony: Security and forms
Form validation in Symfony runs server-side even if the client-side (HTML5) checks passed.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T22-L7 · Symfony: Security and forms
Which Symfony maker command generates a form class (FormType)?
Верный ответ: make:form
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T22-L8 · Symfony: Security and forms
Symfony stores the user's password in the session in plain text.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
92.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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T23-L3 · Symfony: configuration and services
Which Symfony command lists the container's registered services and their aliases?
Верный ответ: debug:container
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T23-L4 · Symfony: configuration and services
The Symfony container allows changing parameters at runtime: $container->setParameter() works from a controller.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T23-L7 · Symfony: configuration and services
Environment variable values are injected into services.yaml using the %env(VAR)% syntax.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T23-L8 · Symfony: configuration and services
Which Symfony environment variable enables debug mode (affects the profiler and Twig debugging)?
Верный ответ: app_debug
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100.0%
Symfony: Messenger
100
T16-L1 · Symfony: Messenger
A single message in Symfony Messenger can only have one handler.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T16-L2 · Symfony: Messenger
The sync transport in Messenger queues the message for a worker, just like async.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T16-L3 · Symfony: Messenger
Which console command starts the worker that processes Messenger queue messages?
Верный ответ: messenger:consume
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
T16-L4 · Symfony: Messenger
Retries for failed messages (retry_strategy) are configured per Messenger transport.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✓
0
T16-L5 · Symfony: Messenger
By default, Messenger serializes messages to JSON.
Верный ответ: no
run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
80
T16-L6 · Symfony: Messenger
Symfony Scheduler produces messages on a schedule and dispatches them through Messenger.
Верный ответ: yes
run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T16-L7 · Symfony: Messenger
Which built-in Messenger transport stores messages in database tables via Doctrine?
Верный ответ: doctrine
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T16-L8 · Symfony: Messenger
The Messenger pipeline can be extended with custom middleware, placed before or after the built-in ones.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
60
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-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✗
82.0%
Symfony: versions
80
T28-L1 · Symfony: versions
Symfony major releases come every two years, minor ones every six months (in May and November).
Верный ответ: yes
run-21: ✓ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
T28-L2 · Symfony: versions
What is the minimum PHP version required by Symfony 8?
Верный ответ: 8.4
run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T28-L3 · Symfony: versions
Symfony 7.0 kept support for docblock annotations (validation, routes).
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T28-L4 · Symfony: versions
AssetMapper manages CSS/JS without node or webpack — via importmap.php.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
T28-L5 · Symfony: versions
Symfony 6.4 is a regular release without long-term support.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗
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-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓
100
T28-L7 · Symfony: versions
Every Symfony major release is accompanied by an UPGRADE guide listing the changes.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T28-L8 · Symfony: versions
Which Symfony component manages assets and the importmap without node/webpack?
Верный ответ: asset-mapper
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
92.0%
Symfony: 8.2 and beyond
80
T29-L1 · Symfony: 8.2 and beyond
As of 2026-11-07, Symfony 8.2 has already been released.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓
40
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-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✓ · run-25: ✓
100
T29-L3 · Symfony: 8.2 and beyond
Which Symfony version comes after 8.1 (as of 2026-11-07)?
Верный ответ: 8.2
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
87.5%
Twig
100
T21-L1 · Twig
Inside {{ }}, Twig allows calling arbitrary PHP code directly.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T21-L2 · Twig
By default, Twig auto-escapes printed variables.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T21-L3 · Twig
The Twig |e filter escapes a string for safe output in an HTML context.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
0
T21-L4 · Twig
Which filter from twig/intl-extra formats a number according to a locale?
Верный ответ: format_number
run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
100
T21-L5 · Twig
The |raw filter disables auto-escaping for the value.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T21-L6 · Twig
In Twig, {{ }} prints an expression value, while {% %} executes tags — conditions, loops, set.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T21-L7 · Twig
In Twig you cannot declare a variable inside a template — values only come from the controller.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T21-L8 · Twig
Which Twig function dumps the debug structure of a variable (array, object)?
Верный ответ: dump
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
20
T21-L9 · Twig
What does this Twig template output? ```twig {{ false|default(2) * 3 }} ```
Верный ответ: 6
run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✓
0
T21-L10 · Twig
What exception class does render() of this template throw? ```twig {{ 'a' ~ 1 + 2 }} ```
Верный ответ: runtimeerror
run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗
72.0%
Bootstrap
100
T24-L1 · Bootstrap
Bootstrap is a CSS/JS library of ready-made UI components, not an SPA framework.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T24-L2 · Bootstrap
Which Bootstrap class gives a responsive container with a fixed max width per breakpoint?
Верный ответ: container
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T24-L3 · Bootstrap
The Bootstrap grid is built on CSS floats and splits a row into 16 columns.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
40
T24-L5 · Bootstrap
Utilities like .mt-3 or .px-2 use the spacing scale: the number is a multiple of $spacer.
Верный ответ: no
run-21: ✗ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✗
100
T24-L6 · Bootstrap
Which Bootstrap 5 data attribute enables an interactive component (e.g. dropdown) on an element?
Верный ответ: data-bs-toggle
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T24-L7 · Bootstrap
Bootstrap 5 components work without jQuery — in plain vanilla JS.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T24-L8 · Bootstrap
Dark mode in Bootstrap is enabled with a .dark class on the root element.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T24-L9 · Bootstrap
What is the max-width of .container in Bootstrap 5.3 at a 992px viewport?
Верный ответ: 960
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
94.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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T14-L2 · Doctrine
Which EntityManager method marks a new object as managed without executing SQL until flush()?
Верный ответ: persist
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
80
T14-L3 · Doctrine
In Doctrine ORM 3, the EntityManager::merge() method exists and makes the passed object managed.
Верный ответ: no
run-21: ✓ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T14-L4 · Doctrine
DQL queries are written in terms of entities and their fields, not tables and columns.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T14-L5 · Doctrine
What does $repository->find(999) return when no record with id 999 exists?
Верный ответ: null
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
60
T14-L6 · Doctrine
DoctrineBundle in Symfony automatically calls flush() at the end of every request.
Верный ответ: no
run-21: ✓ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✗
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T14-L8 · Doctrine
remove() executes the SQL DELETE immediately, without waiting for flush().
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
94.0%
PostgreSQL
100
T15-L1 · PostgreSQL
PostgreSQL uses MVCC, therefore readers block writers and writers block readers.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T15-L2 · PostgreSQL
Which SQL command shows a query's execution plan without executing the query?
Верный ответ: explain
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T15-L3 · PostgreSQL
SERIAL and GENERATED ... AS IDENTITY are just two names for the same mechanism.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T15-L4 · PostgreSQL
By default, a PostgreSQL UNIQUE constraint allows only one row with NULL in the column.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T15-L5 · PostgreSQL
Which PostgreSQL aggregate function concatenates strings with a separator?
Верный ответ: string_agg
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T15-L6 · PostgreSQL
Plain VACUUM returns the space occupied by dead tuples to the operating system.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
40
T15-L7 · PostgreSQL
Which keyword in a window function definition partitions rows into groups the function is computed over?
Верный ответ: partition by
run-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✗ · run-25: ✗
100
T15-L8 · PostgreSQL
The READ COMMITTED isolation level protects against non-repeatable reads.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
94.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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T17-L2 · PostgreSQL: transactions and indexes
Which SQL command ends a transaction, committing all its changes?
Верный ответ: commit
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T17-L4 · PostgreSQL: transactions and indexes
To roll back part of the statements inside a transaction, PostgreSQL uses SAVEPOINT.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T17-L5 · PostgreSQL: transactions and indexes
EXPLAIN ANALYZE shows the query plan without executing the query.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T17-L6 · PostgreSQL: transactions and indexes
Which PostgreSQL extension adds vector types and indexes for embedding search?
Верный ответ: vector
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T17-L7 · PostgreSQL: transactions and indexes
A partial index (CREATE INDEX ... WHERE ...) is built only over rows satisfying the condition.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T17-L8 · PostgreSQL: transactions and indexes
The SERIALIZABLE level in PostgreSQL is implemented by locking the rows a transaction reads.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T19-L5 · HTTP and REST API
Status 429 Too Many Requests is used when a client exceeds a rate limit.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T19-L6 · HTTP and REST API
5xx codes mean a client error, while 4xx means a server-side error.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T19-L7 · HTTP and REST API
Which HTTP header indicates the MIME type of the request or response body?
Верный ответ: content-type
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T19-L8 · HTTP and REST API
PATCH is not required to be idempotent per RFC 5789, unlike PUT.
Верный ответ: yes
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
98.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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T20-L3 · Security and OAuth
Which HTTP header enables the CSP (Content Security Policy) policy?
Верный ответ: content-security-policy
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T20-L4 · Security and OAuth
OAuth 2.0 is an authentication protocol: the access token tells you who the user is.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T20-L5 · Security and OAuth
XSS is prevented by validating input on the server before writing it to the database.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T20-L8 · Security and OAuth
A password salt must be kept secret: without it the hash cannot be verified.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100.0%
Testing: PHPUnit
100
T18-L1 · Testing: PHPUnit
PHPUnit runs test methods of any class — extending TestCase is not required.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T18-L2 · Testing: PHPUnit
In PHPUnit, setUp() runs once before all tests of the class.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T18-L3 · Testing: PHPUnit
A data provider lets a test run with exactly one set of arguments.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T18-L4 · Testing: PHPUnit
Which PHPUnit method declares an expectation that an exception of a given class is thrown?
Верный ответ: expectexception
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T18-L5 · Testing: PHPUnit
In PHPUnit, a stub verifies which methods were called on it, while a mock only returns data.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
100
T18-L7 · Testing: PHPUnit
PHPUnit does not allow one test to depend on the result of another.
Верный ответ: no
run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
20
T18-L8 · Testing: PHPUnit
Which PHPUnit command-line option makes tests run in random order?
Верный ответ: --order-by=random
run-21: ✗ · run-22: ✓ · run-23: ✗ · run-24: ✗ · run-25: ✗
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
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-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓
92.0%

Прогоны: точность и стоимость

ПрогонthinkВерно% ВремяТокены (вх / вых / кэш)
run-21low216 / 24090.0%469.9 c46044 / 68415 / 0
run-22low222 / 24092.5%428.2 c46044 / 62116 / 0
run-23low221 / 24092.1%431.4 c46044 / 62263 / 0
run-24low222 / 24092.5%441.8 c46044 / 66499 / 0
run-25low219 / 24091.2%422.3 c46044 / 63634 / 0

Флипующие клетки

КлеткаУтверждениеrun-21run-22run-23run-24run-25
T01-L4print returns the value 1 and can be used inside an expression.yesyesyesnono
T01-L8What string will this print: echo 'sum: ' . 2 + 3; (PHP 8)?yesyesyesyesyes
T02-L4Under loose comparison, null equals 0, the empty string, and false at the same time.noyesyesyesyes
T02-L7When cast to string, false becomes "0".yesnononono
T04-L6What does array_slice([10, 20, 30, 40], 1, 2) return?yesyesyesyesyes
T06-L5What does get_class(new class {}) return? Answer with the part of the name before the NUL byte (without the file path).yesyesyesyesyes
T07-L3An interface can declare static methods.yesyesnonono
T09-L3Into which file (path from src/) does the PSR-4 mapping "App\ → src/" place the class App\Controller\Api\UserController?yesyesyesyesyes
T09-L8A use statement may be written inside a function body — the import then applies to that function only.noyesyesnono
T11-L3The yield from construct delegates traversal to another generator or iterable.yesyesyesyesno
T12-L3What does password_verify('secret', password_hash('secret', PASSWORD_DEFAULT)) return?yesyesyesyesyes
T12-L6Which built-in function returns the SAPI name (e.g., cli)?yesyesyesyesyes
VC-L1In which PHP version was the array_find() function introduced?yesyesyesyesyes
VC-L4In which PHP version was the #[\NoDiscard] attribute introduced? Answer with the version number.yesyesyesyesyes
VC-L5In which PHP version did the pipe operator |> first appear? Answer with the version number.yesyesyesyesyes
VC-L7In which PHP version were the array_first() and array_last() functions introduced?yesyesyesyesyes
VC-L8For which PHP version was RFC Partial Function Application v2 adopted (as of 2026-11-07)? Answer with the version number.yesyesyesyesyes
VF-L1For which PHP version was the RFC clamp_v2 (the clamp() function) implemented, as of 2026-11-07? Answer with the version number.yesyesyesyesyes
VF-L3RFC Bound-Erased Generic Types (generics) was declined in 2026.nonoyesyesyes
T25-L4What sits at the very center of the onion architecture?yesyesyesyesyes
T26-L6What is the boundary called within which a model and its language are consistent, while outside the same words mean other models?yesyesyesyesyes
T13-L2Which Symfony console command lists all registered routes?yesyesyesyesyes
T16-L4Retries for failed messages (retry_strategy) are configured per Messenger transport.yesyesyesnoyes
T16-L6Symfony Scheduler produces messages on a schedule and dispatches them through Messenger.noyesyesyesyes
T28-L1Symfony major releases come every two years, minor ones every six months (in May and November).yesnoyesyesyes
T28-L2What is the minimum PHP version required by Symfony 8?yesyesyesyesyes
T28-L5Symfony 6.4 is a regular release without long-term support.nonononoyes
T28-L6When moving to a new Symfony major version, deprecations of the previous branch keep working — major releases do not remove them.nonoyesnono
T29-L1As of 2026-11-07, Symfony 8.2 has already been released.nonoyesnono
T29-L2As of 2026-11-07, Symfony 8.2 is scheduled for November 2026, following the usual six-month cycle.nononoyesyes
T29-L5Updating within a major branch (8.1 → 8.2) should not require code changes — backward compatibility is preserved.yesyesyesnoyes
T21-L4Which filter from twig/intl-extra formats a number according to a locale?yesyesyesyesyes
T24-L5Utilities like .mt-3 or .px-2 use the spacing scale: the number is a multiple of $spacer.yesyesnonoyes
T14-L2Which EntityManager method marks a new object as managed without executing SQL until flush()?yesyesyesyesyes
T14-L3In Doctrine ORM 3, the EntityManager::merge() method exists and makes the passed object managed.noyesnonono
T14-L5What does $repository->find(999) return when no record with id 999 exists?yesyesyesyesyes
T14-L6DoctrineBundle in Symfony automatically calls flush() at the end of every request.noyesnonoyes
T15-L7Which keyword in a window function definition partitions rows into groups the function is computed over?yesyesyesyesyes
T19-L3The DELETE method is idempotent per the HTTP specification: repeating the request for the same resource does not change the outcome.noyesyesyesyes
T18-L8Which PHPUnit command-line option makes tests run in random order?yesyesyesyesyes
T01-L9What does this code output? ```php echo intdiv(7, 2) . intdiv(-7, 2); ```yesyesyesyesyes
T02-L9What does this code output? ```php echo '1e1' == '10' ? 'true' : 'false'; ```yesyesyesyesyes
T02-L10What does this code output? ```php switch ('a') { case 0: echo 'zero'; break; default: echo 'other'; } ```yesyesyesyesyes
T03-L10What does this code output? ```php echo '[' . substr('hello', -10) . ']'; ```yesyesyesyesyes
T04-L10What 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)); ```yesyesyesyesyes
T06-L10What 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; ```yesyesyesyesyes
T09-L10What does this code output? ```php namespace Ns; class Foo {} $c = 'Foo'; echo (class_exists($c) ? 'yes' : 'no') . (class_exists(__NAMESPACE__ . '\\' . $c) ? 'yes' : 'no'); ```yesyesyesyesyes
T11-L9What does this code output? ```php function g(): Generator { $x = yield 1; return $x + 1; } $g = g(); $g->send(10); echo $g->getReturn(); ```noyesyesyesno
T12-L10What does this code output on PHP 8.5? ```php echo (E_ALL & 2048) === 0 ? 'strict-out' : 'strict-in'; ```yesyesyesyesyes
T16-L10What 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; ```yesyesyesyesyes
T18-L10How 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)yesyesyesyesyes
T21-L9What does this Twig template output? ```twig {{ false|default(2) * 3 }} ```yesyesyesyesyes
T21-L10What exception class does render() of this template throw? ```twig {{ 'a' ~ 1 + 2 }} ```yesyesyesyesyes
T22-L10What 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); } ```yesyesyesyesyes

Все клетки

КлеткаВопросОтветы по прогонамВерный ответ
T01-L1
Syntax and operators
Double-quoted and single-quoted strings are processed identically; the difference is only in speed.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T01-L2
Syntax and operators
The ?? operator follows isset semantics and raises no warnings for undefined variables.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T01-L3
Syntax and operators
What will this print: echo 'a', 'b';run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓ab
T01-L4
Syntax and operators
print returns the value 1 and can be used inside an expression.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✗yes
T01-L5
Syntax and operators
The ?: (elvis) operator returns its left operand when it is falsy.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T01-L6
Syntax and operators
In PHP 8, the concatenation operator (.) has lower precedence than addition and subtraction.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T01-L7
Syntax and operators
The expression 2 ** 3 ** 2 in PHP evaluates as (2 ** 3) ** 2, that is, 64.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T01-L8
Syntax and operators
What string will this print: echo 'sum: ' . 2 + 3; (PHP 8)?run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✗sum: 5
T02-L1
Types and comparisons
With strict comparison (===), arrays are considered equal regardless of element order.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T02-L2
Types and comparisons
The comparison 0 == false returns false because it is a strict comparison.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T02-L3
Types and comparisons
In PHP 8, the expression "abc" == 0 returns true.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T02-L4
Types and comparisons
Under loose comparison, null equals 0, the empty string, and false at the same time.run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T02-L5
Types and comparisons
What does the expression (int) '42abc' return?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓42
T02-L6
Types and comparisons
What does the expression '5' + 5 return?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓10
T02-L7
Types and comparisons
When cast to string, false becomes "0".run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T02-L8
Types and comparisons
The comparison 0.1 + 0.2 === 0.3 returns false.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T03-L1
Strings
strrev() correctly reverses a UTF-8 string.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T03-L2
Strings
str_contains('Hello world', 'world') returns true.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T03-L3
Strings
str_pad() can pad a string on the right side only.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T03-L4
Strings
By default trim() strips only spaces, leaving tabs and newlines intact.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T03-L5
Strings
How many BYTES does strlen('héllo') return for a UTF-8 string?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓6
T03-L6
Strings
What does substr('abcdef', -3) return?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓def
T03-L7
Strings
ucfirst() modifies the string passed to it in place.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T03-L8
Strings
Variable interpolation works in heredoc but not in nowdoc.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T04-L1
Arrays
The sort() function preserves the key-to-value association of the array.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T04-L2
Arrays
The string key '5' in an array is stored as the integer 5.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T04-L3
Arrays
The in_array() function uses strict comparison (===) by default.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T04-L4
Arrays
Without a callback, array_filter() removes all "empty" (falsy) elements from the array.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T04-L5
Arrays
By default, array_slice() preserves the original numeric keys of the array.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T04-L6
Arrays
What does array_slice([10, 20, 30, 40], 1, 2) return?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓[20,30]
T04-L7
Arrays
How many elements will count(['a' => 1] + ['a' => 9, 'b' => 2]) return?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓2
T04-L8
Arrays
Since PHP 8.1, the spread operator [...$a, ...$b] supports arrays with string keys.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T05-L1
Functions and closures
Named arguments cannot be combined with argument unpacking ...$args in a single call.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T05-L2
Functions and closures
An anonymous function without use sees variables from the outer scope.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
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)?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓3
T05-L4
Functions and closures
The body of an arrow function fn may consist of several expressions in curly braces.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T05-L5
Functions and closures
An arrow function fn captures outer variables by reference (lazily, at use time).run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T05-L6
Functions and closures
A closure declared as static function () {} does not capture $this.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T05-L7
Functions and closures
What will this print: $x = 5; $f = function () use ($x) { return $x; }; $x = 7; echo $f();run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓5
T05-L8
Functions and closures
In weak typing mode (without strict_types), passing the string "5" to an int parameter is allowed.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T06-L1
OOP: classes and inheritance
PHP supports constructor property promotion: public function __construct(private int $x) {}.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T06-L2
OOP: classes and inheritance
Which keyword prevents a method from being overridden in subclasses?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓final
T06-L3
OOP: classes and inheritance
A method declared final cannot be overridden in a subclass.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T06-L4
OOP: classes and inheritance
Parent properties with private visibility are accessible in a subclass.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
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).run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓class@anonymous
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T06-L7
OOP: classes and inheritance
The magic method __get() is called only for non-existent properties.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T06-L8
OOP: classes and inheritance
What does reassigning a readonly property throw — Exception or Error?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓error
T07-L1
Interfaces, traits, enum
An interface can declare constants.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T07-L2
Interfaces, traits, enum
Which operator checks whether an object is an instance of a class or interface?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓instanceof
T07-L3
Interfaces, traits, enum
An interface can declare static methods.run-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✗ · run-25: ✗yes
T07-L4
Interfaces, traits, enum
The instanceof operator only checks class inheritance: it ignores interfaces.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T07-L5
Interfaces, traits, enum
An interface method may have a default implementation, like a trait method.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T07-L6
Interfaces, traits, enum
An abstract method in an abstract class may have protected visibility.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T07-L7
Interfaces, traits, enum
How many elements will Foo::cases() return for enum Foo { case A; case B; case C; }?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓3
T07-L8
Interfaces, traits, enum
A trait can declare constants.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T08-L1
Exceptions and errors
The Throwable interface is a common ancestor of both Exception and Error.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T08-L2
Exceptions and errors
A catch (Exception $e) block will also catch TypeError, because TypeError ultimately inherits from Exception.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T08-L3
Exceptions and errors
The @ operator suppresses exceptions too.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T08-L4
Exceptions and errors
What error class does intdiv(5, 0) throw?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓divisionbyzeroerror
T08-L5
Exceptions and errors
The finally block runs only if the exception was caught by a catch block.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T08-L6
Exceptions and errors
An exception thrown inside a finally block has no effect on the result of the try block.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T08-L7
Exceptions and errors
What does the expression (bool) new Exception('x') return?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓true
T08-L8
Exceptions and errors
Functions registered via register_shutdown_function() run when exit is called.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T09-L1
Namespaces and autoloading
The use App\Service\Mailer; statement itself loads the class file.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T09-L2
Namespaces and autoloading
What follows use to import a function (not a class): the word function or const?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓function
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?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓src/controller/api/usercontroller.php
T09-L4
Namespaces and autoloading
Including vendor/autoload.php registers autoloaders via spl_autoload_register().run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T09-L5
Namespaces and autoloading
The magic constant __NAMESPACE__ contains the name of the current namespace.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T09-L6
Namespaces and autoloading
An unqualified class name (without a leading \) in new is resolved from the global root.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T09-L8
Namespaces and autoloading
A use statement may be written inside a function body — the import then applies to that function only.run-21: ✓ · run-22: ✗ · run-23: ✗ · run-24: ✓ · run-25: ✓no
T10-L1
References and scope
Arrays are copied on assignment rather than passed by reference.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T10-L2
References and scope
What will this print: $a = [1, 2]; $b = $a; $b[] = 3; echo count($a);run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓2
T10-L3
References and scope
Inside a function, user-defined global variables are inaccessible without global, $GLOBALS, or passing them as parameters.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T10-L4
References and scope
unset($GLOBALS['x']) inside a function removes the global variable only for that function.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T10-L5
References and scope
What will this print: function inc(&$x) { $x++; } $n = 5; inc($n); echo $n;run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓6
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T10-L7
References and scope
A static property belongs to each instance separately: changes in one object are not visible in others.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T10-L8
References and scope
An array can have a boolean key true, and it will be stored as bool.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T11-L1
Generators, iterators, SPL
Inside a generator, return with a value can be used, and it becomes available via $gen->getReturn().run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T11-L2
Generators, iterators, SPL
A fully consumed generator can be rewound with rewind() and traversed again.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T11-L3
Generators, iterators, SPL
The yield from construct delegates traversal to another generator or iterable.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗yes
T11-L4
Generators, iterators, SPL
What does get_class(g()) return for function g() { yield 1; }?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓generator
T11-L5
Generators, iterators, SPL
How many elements will count(iterator_to_array((function () { yield from [1, 2, 3]; })())) return?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓3
T11-L6
Generators, iterators, SPL
The SplStack class implements a FIFO queue.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T11-L7
Generators, iterators, SPL
ArrayIterator allows wrapping an array and traversing it via the Iterator interface.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T11-L8
Generators, iterators, SPL
An ArrayObject instance cannot be traversed with foreach.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T12-L1
Configuration and security
password_hash() generates a salt automatically — passing one separately is not needed.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T12-L2
Configuration and security
In PHP 8, PASSWORD_DEFAULT is md5 with an automatically added salt.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T12-L3
Configuration and security
What does password_verify('secret', password_hash('secret', PASSWORD_DEFAULT)) return?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓true
T12-L4
Configuration and security
strip_tags() protects against SQL injection.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T12-L5
Configuration and security
session_regenerate_id() is used to protect against session fixation upon user login.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T12-L6
Configuration and security
Which built-in function returns the SAPI name (e.g., cli)?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓php_sapi_name
T12-L7
Configuration and security
session_destroy() deletes session data on the server but not the cookie in the user's browser.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T12-L8
Configuration and security
Without calling session_start(), the $_SESSION array is automatically populated with session data.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
VC-L1
PHP 8.4–8.5
In which PHP version was the array_find() function introduced?run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✓ · run-25: ✗8.4
VC-L2
PHP 8.4–8.5
Property hooks (get/set right in the property declaration) landed in PHP 8.4.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
VC-L3
PHP 8.4–8.5
Asymmetric visibility (public private(set) string $name) appeared in PHP 8.4.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
VC-L4
PHP 8.4–8.5
In which PHP version was the #[\NoDiscard] attribute introduced? Answer with the version number.run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗8.5
VC-L5
PHP 8.4–8.5
In which PHP version did the pipe operator |> first appear? Answer with the version number.run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗8.5
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.run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗8.5
VC-L7
PHP 8.4–8.5
In which PHP version were the array_first() and array_last() functions introduced?run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗8.5
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.run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗8.6
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.run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗8.6
VF-L2
PHP: 8.6+ and the future
RFC Context Managers v2 has already been adopted in PHP (as of 2026-11-07).run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
VF-L3
PHP: 8.6+ and the future
RFC Bound-Erased Generic Types (generics) was declined in 2026.run-21: ✗ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
VF-L5
PHP: 8.6+ and the future
As of PHP 8.5, generics (parameterized types) are still absent.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
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).run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
VF-L7
PHP: 8.6+ and the future
The PHP 6 branch never shipped: after PHP 5.6 came PHP 7.0 directly.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
VF-L8
PHP: 8.6+ and the future
The RFC adding the #[\Deprecated] attribute to the core was adopted.run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗yes
T25-L1
Clean architecture
The dependency rule of clean and onion architecture: inner layers know nothing about outer ones — dependencies point toward the center.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T25-L2
Clean architecture
Domain entities import neither Doctrine nor Symfony — only the language and, possibly, the standard library.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T25-L3
Clean architecture
Controllers and Twig templates belong to the business-logic layer because they are the ones calling use cases.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T25-L4
Clean architecture
What sits at the very center of the onion architecture?run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗domain model
T25-L5
Clean architecture
Layer boundary violations can be caught automatically: a layer-dependency analyzer (e.g. deptrac) fails on a forbidden call.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T25-L6
Clean architecture
A use case (interactor) may accept an HTTP request or an EntityManager as arguments — it is simpler that way.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T25-L7
Clean architecture
What is the component called that provides a collection of aggregates/entities while hiding the storage mechanism behind an interface?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓repository
T25-L8
Clean architecture
In clean architecture, swapping PostgreSQL for another database touches only the outer layer — the domain and use cases stay unchanged.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T26-L1
DDD
In DDD, an aggregate is just another name for a database table.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T26-L2
DDD
A Value Object is immutable and compared by the values of its fields, not by identity.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T26-L3
DDD
What is the single external entry point of an aggregate, through which all changes must go, called?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓aggregate root
T26-L4
DDD
In DDD, a repository is declared for an aggregate (its root), not for every entity.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T26-L5
DDD
Ubiquitous language is the model's shared language common to developers and domain experts.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
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?run-21: ✗ · run-22: ✓ · run-23: ✗ · run-24: ✗ · run-25: ✗bounded context
T26-L7
DDD
An anemic model (objects with only getters/setters, logic in services) is the recommended DDD style.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T26-L8
DDD
Bounded context means each context has its own model: the same concept in different contexts is a different class.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T13-L1
Symfony
Services in the Symfony DI container are created lazily by default — on first use.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T13-L2
Symfony
Which Symfony console command lists all registered routes?run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓debug:router
T13-L3
Symfony
Symfony autowiring requires manually declaring every service in services.yaml.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T13-L4
Symfony
Twig templates are compiled into PHP classes and cached between requests.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T13-L5
Symfony
In the Symfony dev environment the DI container is rebuilt only after tracked files change, not on every request.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T13-L6
Symfony
Which environment variable selects the active Symfony environment (dev/prod)?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓app_env
T13-L7
Symfony
A controller method can be private — Symfony routing works with any method of the class.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T13-L8
Symfony
Event subscribers always receive events before listeners, because the interface gives them priority.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T22-L2
Symfony: Security and forms
Which Symfony attribute checks a role/permission right on a controller method (403 without it)?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓isgranted
T22-L3
Symfony: Security and forms
Voters are Symfony's mechanism for checking access to a specific object: isGranted('EDIT', $post).run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T22-L5
Symfony: Security and forms
CSRF protection of Symfony forms is enabled by default: the form validates the token on submission.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T22-L6
Symfony: Security and forms
Form validation in Symfony runs server-side even if the client-side (HTML5) checks passed.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T22-L7
Symfony: Security and forms
Which Symfony maker command generates a form class (FormType)?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓make:form
T22-L8
Symfony: Security and forms
Symfony stores the user's password in the session in plain text.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T23-L1
Symfony: configuration and services
Symfony bundle configuration lives in config/packages — one file per bundle or topic.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T23-L3
Symfony: configuration and services
Which Symfony command lists the container's registered services and their aliases?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓debug:container
T23-L4
Symfony: configuration and services
The Symfony container allows changing parameters at runtime: $container->setParameter() works from a controller.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T23-L5
Symfony: configuration and services
By default, Symfony services are public (public: true) — you can fetch them directly from the container.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T23-L6
Symfony: configuration and services
Without a config file in config/packages a bundle will not work — configuration is mandatory for every bundle.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T23-L7
Symfony: configuration and services
Environment variable values are injected into services.yaml using the %env(VAR)% syntax.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T23-L8
Symfony: configuration and services
Which Symfony environment variable enables debug mode (affects the profiler and Twig debugging)?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓app_debug
T16-L1
Symfony: Messenger
A single message in Symfony Messenger can only have one handler.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T16-L2
Symfony: Messenger
The sync transport in Messenger queues the message for a worker, just like async.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T16-L3
Symfony: Messenger
Which console command starts the worker that processes Messenger queue messages?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓messenger:consume
T16-L4
Symfony: Messenger
Retries for failed messages (retry_strategy) are configured per Messenger transport.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✓yes
T16-L5
Symfony: Messenger
By default, Messenger serializes messages to JSON.run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗no
T16-L6
Symfony: Messenger
Symfony Scheduler produces messages on a schedule and dispatches them through Messenger.run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T16-L7
Symfony: Messenger
Which built-in Messenger transport stores messages in database tables via Doctrine?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓doctrine
T16-L8
Symfony: Messenger
The Messenger pipeline can be extended with custom middleware, placed before or after the built-in ones.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T28-L1
Symfony: versions
Symfony major releases come every two years, minor ones every six months (in May and November).run-21: ✓ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T28-L2
Symfony: versions
What is the minimum PHP version required by Symfony 8?run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓8.4
T28-L3
Symfony: versions
Symfony 7.0 kept support for docblock annotations (validation, routes).run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T28-L4
Symfony: versions
AssetMapper manages CSS/JS without node or webpack — via importmap.php.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T28-L5
Symfony: versions
Symfony 6.4 is a regular release without long-term support.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗no
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.run-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓no
T28-L7
Symfony: versions
Every Symfony major release is accompanied by an UPGRADE guide listing the changes.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T28-L8
Symfony: versions
Which Symfony component manages assets and the importmap without node/webpack?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓asset-mapper
T29-L1
Symfony: 8.2 and beyond
As of 2026-11-07, Symfony 8.2 has already been released.run-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓no
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.run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✓ · run-25: ✓yes
T29-L3
Symfony: 8.2 and beyond
Which Symfony version comes after 8.1 (as of 2026-11-07)?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓8.2
T29-L4
Symfony: 8.2 and beyond
Symfony 8.2 is a major release requiring applications to be rewritten for new APIs.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✓yes
T29-L6
Symfony: 8.2 and beyond
Which minor version of the 8.x branch is released last, before Symfony 9.0?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓8.4
T29-L7
Symfony: 8.2 and beyond
Symfony 8.2 will require PHP 8.5 — you would have to upgrade PHP along with it.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T29-L8
Symfony: 8.2 and beyond
Deprecations added in the 8.x branch will not be removed before Symfony 9.0.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T21-L1
Twig
Inside {{ }}, Twig allows calling arbitrary PHP code directly.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T21-L2
Twig
By default, Twig auto-escapes printed variables.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T21-L3
Twig
The Twig |e filter escapes a string for safe output in an HTML context.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T21-L4
Twig
Which filter from twig/intl-extra formats a number according to a locale?run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗format_number
T21-L5
Twig
The |raw filter disables auto-escaping for the value.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T21-L6
Twig
In Twig, {{ }} prints an expression value, while {% %} executes tags — conditions, loops, set.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T21-L7
Twig
In Twig you cannot declare a variable inside a template — values only come from the controller.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T21-L8
Twig
Which Twig function dumps the debug structure of a variable (array, object)?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓dump
T24-L1
Bootstrap
Bootstrap is a CSS/JS library of ready-made UI components, not an SPA framework.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T24-L2
Bootstrap
Which Bootstrap class gives a responsive container with a fixed max width per breakpoint?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓container
T24-L3
Bootstrap
The Bootstrap grid is built on CSS floats and splits a row into 16 columns.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T24-L4
Bootstrap
Bootstrap's named breakpoints (the infix used in class names) are sm, md, lg, xl, xxl — five of them.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T24-L5
Bootstrap
Utilities like .mt-3 or .px-2 use the spacing scale: the number is a multiple of $spacer.run-21: ✗ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✗no
T24-L6
Bootstrap
Which Bootstrap 5 data attribute enables an interactive component (e.g. dropdown) on an element?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓data-bs-toggle
T24-L7
Bootstrap
Bootstrap 5 components work without jQuery — in plain vanilla JS.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T24-L8
Bootstrap
Dark mode in Bootstrap is enabled with a .dark class on the root element.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T14-L1
Doctrine
Doctrine ORM creates database tables on the fly the first time an entity is used at runtime.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T14-L2
Doctrine
Which EntityManager method marks a new object as managed without executing SQL until flush()?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓persist
T14-L3
Doctrine
In Doctrine ORM 3, the EntityManager::merge() method exists and makes the passed object managed.run-21: ✓ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T14-L4
Doctrine
DQL queries are written in terms of entities and their fields, not tables and columns.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T14-L5
Doctrine
What does $repository->find(999) return when no record with id 999 exists?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓null
T14-L6
Doctrine
DoctrineBundle in Symfony automatically calls flush() at the end of every request.run-21: ✓ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✗no
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T14-L8
Doctrine
remove() executes the SQL DELETE immediately, without waiting for flush().run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T15-L1
PostgreSQL
PostgreSQL uses MVCC, therefore readers block writers and writers block readers.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T15-L2
PostgreSQL
Which SQL command shows a query's execution plan without executing the query?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓explain
T15-L3
PostgreSQL
SERIAL and GENERATED ... AS IDENTITY are just two names for the same mechanism.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T15-L4
PostgreSQL
By default, a PostgreSQL UNIQUE constraint allows only one row with NULL in the column.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T15-L5
PostgreSQL
Which PostgreSQL aggregate function concatenates strings with a separator?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓string_agg
T15-L6
PostgreSQL
Plain VACUUM returns the space occupied by dead tuples to the operating system.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T15-L7
PostgreSQL
Which keyword in a window function definition partitions rows into groups the function is computed over?run-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✗ · run-25: ✗partition by
T15-L8
PostgreSQL
The READ COMMITTED isolation level protects against non-repeatable reads.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T17-L1
PostgreSQL: transactions and indexes
By default, PostgreSQL wraps each single SQL statement in its own implicit transaction (autocommit).run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T17-L2
PostgreSQL: transactions and indexes
Which SQL command ends a transaction, committing all its changes?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓commit
T17-L3
PostgreSQL: transactions and indexes
Indexes speed up more than SELECT: UPDATE and DELETE with a search on an indexed column benefit too.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T17-L4
PostgreSQL: transactions and indexes
To roll back part of the statements inside a transaction, PostgreSQL uses SAVEPOINT.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T17-L5
PostgreSQL: transactions and indexes
EXPLAIN ANALYZE shows the query plan without executing the query.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T17-L6
PostgreSQL: transactions and indexes
Which PostgreSQL extension adds vector types and indexes for embedding search?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓vector
T17-L7
PostgreSQL: transactions and indexes
A partial index (CREATE INDEX ... WHERE ...) is built only over rows satisfying the condition.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T17-L8
PostgreSQL: transactions and indexes
The SERIALIZABLE level in PostgreSQL is implemented by locking the rows a transaction reads.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T19-L1
HTTP and REST API
HTTP status 201 means the request resulted in a new resource being created.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T19-L2
HTTP and REST API
Which HTTP status means a successful request with an empty response body (e.g. after DELETE)?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓204
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.run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T19-L5
HTTP and REST API
Status 429 Too Many Requests is used when a client exceeds a rate limit.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T19-L6
HTTP and REST API
5xx codes mean a client error, while 4xx means a server-side error.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T19-L7
HTTP and REST API
Which HTTP header indicates the MIME type of the request or response body?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓content-type
T19-L8
HTTP and REST API
PATCH is not required to be idempotent per RFC 5789, unlike PUT.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T20-L1
Security and OAuth
Checking a password by comparing its hash to the stored hash with a plain == is sufficient.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
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.).run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T20-L3
Security and OAuth
Which HTTP header enables the CSP (Content Security Policy) policy?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓content-security-policy
T20-L4
Security and OAuth
OAuth 2.0 is an authentication protocol: the access token tells you who the user is.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T20-L5
Security and OAuth
XSS is prevented by validating input on the server before writing it to the database.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
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?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓code
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T20-L8
Security and OAuth
A password salt must be kept secret: without it the hash cannot be verified.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T18-L1
Testing: PHPUnit
PHPUnit runs test methods of any class — extending TestCase is not required.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T18-L2
Testing: PHPUnit
In PHPUnit, setUp() runs once before all tests of the class.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T18-L3
Testing: PHPUnit
A data provider lets a test run with exactly one set of arguments.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T18-L4
Testing: PHPUnit
Which PHPUnit method declares an expectation that an exception of a given class is thrown?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓expectexception
T18-L5
Testing: PHPUnit
In PHPUnit, a stub verifies which methods were called on it, while a mock only returns data.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
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).run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yes
T18-L7
Testing: PHPUnit
PHPUnit does not allow one test to depend on the result of another.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
T18-L8
Testing: PHPUnit
Which PHPUnit command-line option makes tests run in random order?run-21: ✗ · run-22: ✓ · run-23: ✗ · run-24: ✗ · run-25: ✗--order-by=random
T01-L9
Syntax and operators
What does this code output? ```php echo intdiv(7, 2) . intdiv(-7, 2); ```run-21: ✓ · run-22: ✗ · run-23: ✓ · run-24: ✓ · run-25: ✓3-3
T01-L10
Syntax and operators
What does this code output? ```php echo -3 ** 2; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓-9
T02-L9
Types and comparisons
What does this code output? ```php echo '1e1' == '10' ? 'true' : 'false'; ```run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✗ · run-25: ✓true
T02-L10
Types and comparisons
What does this code output? ```php switch ('a') { case 0: echo 'zero'; break; default: echo 'other'; } ```run-21: ✗ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓other
T03-L9
Strings
What does this code output? ```php echo strtr('abc', ['a' => '1', 'ab' => '2']); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓2c
T03-L10
Strings
What does this code output? ```php echo '[' . substr('hello', -10) . ']'; ```run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗[hello]
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)); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓k,n,m
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)); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗yxz
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]); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓4
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(); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓3
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(); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓b
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; ```run-21: ✗ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓10
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(); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓ba
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; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓0
T08-L10
Exceptions and errors
What does this code output? ```php function f(): int { try { return 1; } finally { return 2; } } echo f(); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓2
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(); } ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓second
T09-L9
Namespaces and autoloading
What does this code output? ```php namespace N; use App\Foo as Baz; echo Baz::class . '|' . \Baz::class; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓app\foo|baz
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'); ```run-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✓noyes
T10-L9
References and scope
What does this code output? ```php $a = [1, 2, 3]; foreach ($a as &$v) {} $v = 99; echo implode(',', $a); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓1,2,99
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(); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓3
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(); ```run-21: ✗ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗11
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())); ```run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗ok,2
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'; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓noyes
T12-L10
Configuration and security
What does this code output on PHP 8.5? ```php echo (E_ALL & 2048) === 0 ? 'strict-out' : 'strict-in'; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✗strict-out
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'; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓mapped
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; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓bca
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'; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓same
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')); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓0
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; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓1
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; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓10,30,60
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())); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓m1m2
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; ```run-21: ✓ · run-22: ✓ · run-23: ✗ · run-24: ✓ · run-25: ✗11
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; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓1
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; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓2
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)run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓6
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)run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓2,1
T19-L9
HTTP and REST API
Which HTTP method does this command send? ```bash curl -s -d 'a=1' http://demo.local/api ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓post
T19-L10
HTTP and REST API
Which HTTP method does this command send? ```bash curl -s -G -d 'a=1' http://demo.local/api ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓get
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?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓invalid_client
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?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓fragment
T21-L9
Twig
What does this Twig template output? ```twig {{ false|default(2) * 3 }} ```run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✓6
T21-L10
Twig
What exception class does render() of this template throw? ```twig {{ 'a' ~ 1 + 2 }} ```run-21: ✗ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗runtimeerror
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()])); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓0
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); } ```run-21: ✓ · run-22: ✗ · run-23: ✗ · run-24: ✗ · run-25: ✗symfony\component\form\exception\logicexception
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'; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓same
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'); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓hi bob!
T24-L9
Bootstrap
What is the max-width of .container in Bootstrap 5.3 at a 992px viewport?run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓960
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.run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓text-danger
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, ) {} } ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓2
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, ) {} } ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓3
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; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓10,15
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(); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓1
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(); ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓hi
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'; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓yesno
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'; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓no
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'; ```run-21: ✓ · run-22: ✓ · run-23: ✓ · run-24: ✓ · run-25: ✓noyes