Games PHP
PHP mastery path
Six games on how PHP really behaves: copies and references, scope and closures, classes, errors, type juggling and generators. In every level you predict what the code prints, put each piece where PHP really puts it, and watch it run. Every level's code is checked against the real runtime, so what you see is what really happens.
- Step 1 · 0 / 8 levels
Copy or Share
Arrays copy, objects share, clone is shallow, & ties two names together.
- Step 2 · 0 / 7 levels
Scope Rooms
Function scope, global, static, closures with use, fn and $this.
- Step 3 · 0 / 7 levels
Class Tree
Constructors, overrides, self vs static, traits, abstract, readonly and magic methods.
- Step 4 · 0 / 8 levels
Error Trail
throw, catch order, finally, Error vs Exception, match, previous and destructors.
- Step 5 · 0 / 7 levels
Type Juggler
== vs ===, numeric strings, falsy values, array keys, strict_types and ??.
- Step 6 · 0 / 8 levels
Lazy Line
yield, lazy values, keys, send(), getReturn(), yield from and why you can't rewind.