Tag: php
Debugging PHP PHP 5.0+
Systematic techniques for finding and fixing PHP bugs — from var_dump and error logs to Xdebug step-debugging, with the guiding principle of narrowing down where incorrect behaviour first appears.
2mo ago
php beginner
DI Containers — PHP-DI, Symfony & Laravel Compared PHP 7.4+
A Dependency Injection container automates wiring of class dependencies — instead of manually constructing objects and their dependencies, the container reads type hints and builds the full object graph. PHP-DI, Symfony's DIC, and Laravel's service container are the main options.
2mo ago
php intermediate
DNF Types (PHP 8.2) PHP 8.2+
PHP 8.2 DNF (Disjunctive Normal Form) types allow unions of intersections — (Countable&Iterator)|null — combining PHP 8.1 intersection types with union types.
2mo ago
php advanced
Deprecation Notices & Migration Strategy PHP 5.0+
E_DEPRECATED warnings signal features removed in the next PHP major version — treating them as errors in CI prevents upgrade blockers from accumulating.
2mo ago
php intermediate
Division by Zero & DivisionByZeroError PHP 7.0+
PHP 7+ throws DivisionByZeroError for intdiv() and modulo with zero — but the / operator returns false or INF instead of throwing.
2mo ago
php beginner
Double URL Encoding Bypass PHP 4.0+
Filters operating on URL-decoded input miss double-encoded payloads — %2527 decodes to %27 which decodes to ' — always decode completely before filtering.
2mo ago
security advanced
Database Seeding & Fixture Management PHP 5.0+
Populating databases with consistent, reproducible test and development data — using factories, seeders, and fixtures to create realistic scenarios without manual data entry.
2mo ago
general intermediate
Dead Condition PHP 5.0+
A boolean condition that is always true or always false due to logic errors, making the branch either always execute or never execute.
2mo ago
quality intermediate
Dependency Management Philosophy PHP 5.3+
Every dependency is a liability — prefer few well-maintained packages; pin versions via composer.lock; audit regularly.
2mo ago
general intermediate
Deserialization Gadget Chains PHP 5.0+
PHP object injection exploits that chain existing class methods (__wakeup, __destruct, __toString) to achieve remote code execution when unserialize() processes attacker-controlled data.
2mo ago
security advanced
Dockerfile builds using multiple FROM stages — build dependencies (Composer, Node, test tools) in earlier stages, copy only production artifacts to the final minimal image.
2mo ago
devops intermediate
DSN Security & Connection String Secrets PHP 5.0+
Database credentials in connection strings must never be hardcoded — use environment variables or secrets managers, least-privilege users, and never log DSNs.
2mo ago
database intermediate
Data Transfer Object (DTO) PHP 8.0+
A simple object that carries data between layers or systems with no business logic — reducing coupling between layers and making data contracts explicit.
2mo ago
quality intermediate
Database Migrations PHP 5.0+
Version-controlled, incremental scripts that evolve the database schema alongside code, enabling reproducible deployments and rollbacks.
2mo ago
general intermediate
Date / Time Functions PHP 5.5+
PHP's date/time API including DateTime, DateTimeImmutable, and DateTimeZone for safe, timezone-aware date handling.
2mo ago
php beginner
declare(strict_types=1) PHP 7.0+
Enables strict scalar type checking for function arguments and return values in a PHP file, preventing silent type coercion.
2mo ago
php intermediate
Dependency Inversion Principle (DIP) PHP 5.0+
High-level modules should not depend on low-level modules — both should depend on abstractions (interfaces), not on concrete implementations.
2mo ago
php intermediate
Deprecated & Removed PHP Functions PHP 5.0+
Functions removed or deprecated in modern PHP versions — using them triggers errors or silent failures in new runtimes.
2mo ago
php beginner
Disjunctive Normal Form Types (PHP 8.2) PHP 8.2+
DNF types combine intersection and union types with parentheses — (Countable&Iterator)|null — filling gaps in PHP 8.0/8.1's type system.
2mo ago
php advanced