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