reference appendices

Example Index Strategy

Examples are useful for orientation, but they are not a substitute for reading the documented contract. Check parameters, return types, warnings, and edge cases before adapting an example to production code.

Use This Reference When

  • Starting with an unfamiliar API.
  • Verifying a small behaviour in the PHP CLI.
  • Separating manual guarantees from user-contributed notes.

Prefer small runnable experiments. Change one input at a time and inspect types with var_dump() when loose comparisons or false-like values matter.

Practice

Verify an Example

Use the manual to find an array API example, run a smaller version locally, and add one edge-case input.

Show solution

Record the documented contract, the normal result, and the edge-case result. The useful habit is verifying behaviour rather than pasting an example unchanged.