PHP practice
Every PHP exercise, built from a topic you can open beside it.
69 exercises runs offline
All tracks Python 139 JavaScript 184 TypeScript 76 Go 106 Rust 75 Java 81 Kotlin 66 C++ 92 C# 88 Swift 68 PHP 69 Frontend 82 Backend 139 Architecture and system design 25 DevOps and cloud 15 Data and databases 5 Data science 31 AI and LLM engineering 75 Security 26 Game development 26 Coding in the AI era 101 CS foundations 164
level
php Quiz new Which operation keeps left-side values on duplicate keys and preserves non-sequential int… Use PHP's array transformation, filtering, reduction, merging, key, and sorting functions without losing keys or mutating the wrong value. php Quiz new When does array_map preserve the input array keys? Use PHP's array transformation, filtering, reduction, merging, key, and sorting functions without losing keys or mutating the wrong value. php Predict the output new What does this program print? Use PHP's array transformation, filtering, reduction, merging, key, and sorting functions without losing keys or mutating the wrong value. php Quiz new What is the first accumulator passed by array_reduce($values, $callback) when the initial… Use PHP's array transformation, filtering, reduction, merging, key, and sorting functions without losing keys or mutating the wrong value. php Review AI code new Review generated product feed Use PHP's array transformation, filtering, reduction, merging, key, and sorting functions without losing keys or mutating the wrong value. php Spot the bug new Spot the bug in the filter callback Use PHP's array transformation, filtering, reduction, merging, key, and sorting functions without losing keys or mutating the wrong value. php Quiz new After $copy = $original, which later change can still be visible through both arrays? Understand PHP arrays as ordered maps, including key normalization, list shape, value semantics, references, and silent shape-changing mistakes. php Quiz new Which expression returns true when key email exists with value null? Understand PHP arrays as ordered maps, including key normalization, list shape, value semantics, references, and silent shape-changing mistakes. php Predict the output new What does this program print? Understand PHP arrays as ordered maps, including key normalization, list shape, value semantics, references, and silent shape-changing mistakes. php Predict the output new What JSON does this program print? Understand PHP arrays as ordered maps, including key normalization, list shape, value semantics, references, and silent shape-changing mistakes. php Review AI code new Review generated catalog index Understand PHP arrays as ordered maps, including key normalization, list shape, value semantics, references, and silent shape-changing mistakes. php Spot the bug new Spot the bug in the foreach reference Understand PHP arrays as ordered maps, including key normalization, list shape, value semantics, references, and silent shape-changing mistakes. php Quiz new What does an iterable parameter declaration guarantee? PHP runtime types, declarations, coercion, and strict mode, with boundary techniques that preserve both type and business meaning. php Predict the output new Which two type names are printed? PHP runtime types, declarations, coercion, and strict mode, with boundary techniques that preserve both type and business meaning. php Predict the output new What does this program print? PHP runtime types, declarations, coercion, and strict mode, with boundary techniques that preserve both type and business meaning. php Review AI code new Review generated order input mapper PHP runtime types, declarations, coercion, and strict mode, with boundary techniques that preserve both type and business meaning. php Spot the bug new Spot the bug in the quantity parser PHP runtime types, declarations, coercion, and strict mode, with boundary techniques that preserve both type and business meaning. php Quiz new A function is declared in a file that has strict_types=1, but a non-strict file calls it … PHP runtime types, declarations, coercion, and strict mode, with boundary techniques that preserve both type and business meaning. php Quiz new A new enum case reaches a match expression that has no matching arm and no default. What … Model closed sets with PHP enums, including pure and backed enums, boundary parsing, methods, serialization, and safe evolution. php Predict the output new Which three lines are printed? Model closed sets with PHP enums, including pure and backed enums, boundary parsing, methods, serialization, and safe evolution. php Predict the output new What does this program print? Model closed sets with PHP enums, including pure and backed enums, boundary parsing, methods, serialization, and safe evolution. php Quiz new What is the default JSON behavior of a pure enum? Model closed sets with PHP enums, including pure and backed enums, boundary parsing, methods, serialization, and safe evolution. php Review AI code new Review generated status parser Model closed sets with PHP enums, including pure and backed enums, boundary parsing, methods, serialization, and safe evolution. php Spot the bug new Spot the bug in the UnitEnum helper Model closed sets with PHP enums, including pure and backed enums, boundary parsing, methods, serialization, and safe evolution. php Quiz new What must a custom error handler return when PHP default display or logging should still … Understand PHP diagnostic levels, custom handlers, ErrorException conversion, shutdown inspection, and production-safe reporting. php Predict the output new Which class name does this program print? Understand PHP diagnostic levels, custom handlers, ErrorException conversion, shutdown inspection, and production-safe reporting. php Predict the output new What does this program print? Understand PHP diagnostic levels, custom handlers, ErrorException conversion, shutdown inspection, and production-safe reporting. php Quiz new Which production baseline preserves diagnostics without exposing them in HTTP responses? Understand PHP diagnostic levels, custom handlers, ErrorException conversion, shutdown inspection, and production-safe reporting. php Review AI code new Review generated endpoint boundary Understand PHP diagnostic levels, custom handlers, ErrorException conversion, shutdown inspection, and production-safe reporting. php Spot the bug new Spot the bug in the warning handler Understand PHP diagnostic levels, custom handlers, ErrorException conversion, shutdown inspection, and production-safe reporting. php Predict the output new In what order are the three words printed? Understand how PHP throws, propagates, catches, and cleans up after exceptions, then design failure boundaries with types and exception chains. php Predict the output new Which line does this program print? Understand how PHP throws, propagates, catches, and cleans up after exceptions, then design failure boundaries with types and exception chains. php Quiz new Which expression wraps $error while preserving it as the programmatic cause? Understand how PHP throws, propagates, catches, and cleans up after exceptions, then design failure boundaries with types and exception chains. php Review AI code new Review generated payment boundary Understand how PHP throws, propagates, catches, and cleans up after exceptions, then design failure boundaries with types and exception chains. php Spot the bug new Spot the bug in import cleanup Understand how PHP throws, propagates, catches, and cleans up after exceptions, then design failure boundaries with types and exception chains. php Quiz new Which catch type can receive both a thrown RuntimeException and an engine TypeError? Understand how PHP throws, propagates, catches, and cleans up after exceptions, then design failure boundaries with types and exception chains. php Quiz new What does PHP operator precedence guarantee? Learn how PHP files execute, how expressions produce values, and how conditions, loops, and functions keep programs predictable. php Predict the output new Which label does this match expression print? Learn how PHP files execute, how expressions produce values, and how conditions, loops, and functions keep programs predictable. php Predict the output new What two values does this program print? Learn how PHP files execute, how expressions produce values, and how conditions, loops, and functions keep programs predictable. php Review AI code new Review generated order list renderer Learn how PHP files execute, how expressions produce values, and how conditions, loops, and functions keep programs predictable. php Spot the bug new Spot the bug in the switch branch Learn how PHP files execute, how expressions produce values, and how conditions, loops, and functions keep programs predictable. php Predict the output new Which two city names are printed? Understand PHP 8.3 magic-method triggers, safe dispatch, cloning, and serialization contracts without turning hooks into hidden interfaces. php Predict the output new What does this program print? Understand PHP 8.3 magic-method triggers, safe dispatch, cloning, and serialization contracts without turning hooks into hidden interfaces. php Quiz new When does an external read call __get()? Understand PHP 8.3 magic-method triggers, safe dispatch, cloning, and serialization contracts without turning hooks into hidden interfaces. php Review AI code new Review generated order proxy Understand PHP 8.3 magic-method triggers, safe dispatch, cloning, and serialization contracts without turning hooks into hidden interfaces. php Quiz new A class defines both __serialize() and __sleep(). Which hook does serialize() use on PHP … Understand PHP 8.3 magic-method triggers, safe dispatch, cloning, and serialization contracts without turning hooks into hidden interfaces. php Spot the bug new Spot the bug in proxy forwarding Understand PHP 8.3 magic-method triggers, safe dispatch, cloning, and serialization contracts without turning hooks into hidden interfaces. php Quiz new A file imports App\Models\Invoice, then sets $class = "Invoice" and executes new $class()… PHP namespaces separate colliding declarations and connect code organization, import aliases, name resolution, and PSR-4 autoloading. php Quiz new What does use Vendor\Mail\Client; do in a PHP file? PHP namespaces separate colliding declarations and connect code organization, import aliases, name resolution, and PSR-4 autoloading. php Predict the output new What does this program print? PHP namespaces separate colliding declarations and connect code organization, import aliases, name resolution, and PSR-4 autoloading. php Review AI code new Review generated exporter factory PHP namespaces separate colliding declarations and connect code organization, import aliases, name resolution, and PSR-4 autoloading. php Spot the bug new Spot the bug in the PSR-4 mapping PHP namespaces separate colliding declarations and connect code organization, import aliases, name resolution, and PSR-4 autoloading. php Quiz new What does constructor property promotion guarantee by itself? Build clear contracts with PHP 8.3 classes, encapsulation, interfaces, inheritance, and composition while handling identity and initialization correctly. php Quiz new Why would Checkout accept a ShippingPolicy interface in its constructor? Build clear contracts with PHP 8.3 classes, encapsulation, interfaces, inheritance, and composition while handling identity and initialization correctly. php Predict the output new What does this program print? Build clear contracts with PHP 8.3 classes, encapsulation, interfaces, inheritance, and composition while handling identity and initialization correctly. php Review AI code new Review a generated wallet object Build clear contracts with PHP 8.3 classes, encapsulation, interfaces, inheritance, and composition while handling identity and initialization correctly. php Spot the bug new Spot the bug in the Job subclass Build clear contracts with PHP 8.3 classes, encapsulation, interfaces, inheritance, and composition while handling identity and initialization correctly. php Quiz new What makes #[RequiresRole('admin')] enforce authorization in PHP? Use union types, named arguments, attributes, match, constructor property promotion, and the nullsafe operator without hiding migration risks. php Quiz new A public method changes its parameter from $includeTax to $withTax without changing posit… Use union types, named arguments, attributes, match, constructor property promotion, and the nullsafe operator without hiding migration risks. php Predict the output new What four lines does this program print? Use union types, named arguments, attributes, match, constructor property promotion, and the nullsafe operator without hiding migration risks. php Quiz new When can a promoted property be read through $this inside its constructor? Use union types, named arguments, attributes, match, constructor property promotion, and the nullsafe operator without hiding migration risks. php Review AI code new Review generated shipping quote Use union types, named arguments, attributes, match, constructor property promotion, and the nullsafe operator without hiding migration risks. php Spot the bug new Spot the bug in the optional chain Use union types, named arguments, attributes, match, constructor property promotion, and the nullsafe operator without hiding migration risks. php Predict the output new What does this program print? Reuse behavior across PHP 8.3 classes with traits, resolve member conflicts explicitly, and keep contracts, dependencies, and state ownership clear. php Review AI code new Review generated audit trait Reuse behavior across PHP 8.3 classes with traits, resolve member conflicts explicitly, and keep contracts, dependencies, and state ownership clear. php Spot the bug new Spot the bug in the trait alias Reuse behavior across PHP 8.3 classes with traits, resolve member conflicts explicitly, and keep contracts, dependencies, and state ownership clear. php Quiz new Can insteadof resolve a same-named property declared by a trait and its consuming class? Reuse behavior across PHP 8.3 classes with traits, resolve member conflicts explicitly, and keep contracts, dependencies, and state ownership clear. php Quiz new A service must accept any object that can produce a reference, whether or not it uses For… Reuse behavior across PHP 8.3 classes with traits, resolve member conflicts explicitly, and keep contracts, dependencies, and state ownership clear. php Quiz new On PHP 8.3, when does a child get static trait storage distinct from the parent shown in … Reuse behavior across PHP 8.3 classes with traits, resolve member conflicts explicitly, and keep contracts, dependencies, and state ownership clear.
No practice items match these filters.