Guide Book
Guide Book
A reference you can read front to back or dip into. Every chapter explains the syntax, and most topics have a π Behind the scenes section you can open to see what Python is actually doing, the details classes usually skip. Look for π§ Scenario cards for real-world uses, and press Try it on any example, then open the Inspect tab to look inside.
- Chapter 1How PHP runs your codeFrom the text you type to opcodes a virtual machine executes β and why every request starts from nothing.
- Chapter 2Syntax, tags & structureTags, statements, expressions, blocks, comments and the escaping rules β the grammar everything else is written in.
- Chapter 3Types & type jugglingThe ten types, how PHP converts between them, why `0 == "abc"` changed in PHP 8, and what `declare(strict_types=1)` really does.
- Chapter 4Variables, scope & referencesAssignment copies, objects are handles, `&` makes an alias β and why PHP has no block scope but does have `static`.
- Chapter 5Strings & textFour ways to write a string, what interpolation really does, why a PHP string is bytes rather than characters, and the functions worth knowing.
- Chapter 6ArraysOne type doing the work of list, dictionary, stack and queue β how it is stored, how keys are coerced, and the function set worth memorising.
- Chapter 7All the operatorsArithmetic, comparison, logical, string, bitwise, null-safe, spaceship and pipe β what each one really does, and the precedence that decides who wins.
- Chapter 8Control flowif/else, the three loops, foreach's copy semantics, break and continue with levels, and why `match` beats `switch`.
- Chapter 9Functions, closures & callablesEvery kind of parameter, what a closure captures, the four ways to name a callable, and first-class callable syntax.
- Chapter 10Classes & objectsProperties, visibility, inheritance, interfaces, traits, enums and the magic methods β plus what `static` and `self` really resolve to.
- Chapter 11Errors & exceptionsThe Throwable hierarchy, why PHP has both errors and exceptions, catching and rethrowing, finally, and reading a stack trace.
- Chapter 12The standard libraryA tour of what ships with PHP β dates, JSON, files, regex, hashing, HTTP and the SPL β and how to find the rest.