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.

  1. Chapter 1How PHP runs your codeFrom the text you type to opcodes a virtual machine executes β€” and why every request starts from nothing.
  2. Chapter 2Syntax, tags & structureTags, statements, expressions, blocks, comments and the escaping rules β€” the grammar everything else is written in.
  3. 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.
  4. Chapter 4Variables, scope & referencesAssignment copies, objects are handles, `&` makes an alias β€” and why PHP has no block scope but does have `static`.
  5. 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.
  6. 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.
  7. 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.
  8. Chapter 8Control flowif/else, the three loops, foreach's copy semantics, break and continue with levels, and why `match` beats `switch`.
  9. Chapter 9Functions, closures & callablesEvery kind of parameter, what a closure captures, the four ways to name a callable, and first-class callable syntax.
  10. Chapter 10Classes & objectsProperties, visibility, inheritance, interfaces, traits, enums and the magic methods β€” plus what `static` and `self` really resolve to.
  11. Chapter 11Errors & exceptionsThe Throwable hierarchy, why PHP has both errors and exceptions, catching and rethrowing, finally, and reading a stack trace.
  12. 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.
index.php
Loading editor…
No output yet
Press Run or βŒ˜β†΅ to compile and run your code.

Search

Jump to a lesson or a past run