Reference

This section collects practical reference material for PHP, web development, and related topics. It’s meant as a quick way to look up concepts, functions, best practices, and patterns you’ll encounter while building, maintaining, or operating real-world systems. Over time, the collection will grow to cover a wider range of subjects beyond PHP, but for now it focuses on the essentials and things I use frequently in my own projects.

PHP Official Docs Quick Links

Types: string, int, float, bool, array, null. Constants: predefined constants, magic constants. Predefined variables: $http_response_header, $argc, $argv. Superglobals: $GLOBALS, $_SERVER, $_GET, $_POST, $_FILES, $_COOKIE, $_SESSION, $_REQUEST, $_ENV. Operators: precedence, arithmetic, comparison, logic, array. Control structures: if-elseif-else, for, foreach, while, do-while, switch, break, continue, [more ...]

PHP Style and Best Practices

This is a list PHP coding style and best practices guides. **PHP-FIG.** The ultimate source which most others are based on or recommend is PHP FIG (Framework Interoperability Group). These are their most important documents: PSR-1: Basic Coding Standard. PSR-12: Extended Coding Style. PER Coding Style 2.0. PSR-4: Autoloader. **Other PHP style guides.** Some PHP frameworks and companies publish their [more ...]

PHP String Functions

This is an overview of commonly used PHP string functions. Click the function name for more details on what it does, inputs and outputs, examples, and official docs. Jump to all PHP string functions A-Z. **String + substring.** strpos() = Get position of substring in string. substr() = Get substring by position and length. str_replace() = Replace all occurrences of substring. str_ends_with() = Check [more ...]