← CodeClarityLab Home
Browse by Category
+ added · updated 7d
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Memory Pressure Detection PHP 7.0+
Proactively identifying when a PHP process approaches its memory limit so corrective action can be taken before a fatal error.
1w ago performance intermediate
INSERT ... ON DUPLICATE KEY UPDATE PHP 5.1+
An atomic MySQL upsert — inserts a new row or updates the existing one if a unique key constraint would be violated.
2mo ago database intermediate
MySQL Connection Pooling PHP 5.1+
Reusing database connections across requests instead of opening and closing a new connection on every request.
2mo ago php intermediate
Diagram: N+1 Query Problem N+1 Query Problem PHP 5.1+
A performance anti-pattern where fetching N records triggers N additional queries — one per record — instead of a single JOIN.
2mo ago database intermediate
Diagram: PDO Transactions PDO Transactions PHP 5.1+
PDO wraps multiple queries in an atomic unit — either all succeed or all roll back.
2mo ago php intermediate
PDO::ATTR_EMULATE_PREPARES PHP 5.1+
Controls whether PDO sends real prepared statements to the database or emulates them client-side in PHP.
CWE-89 OWASP A3:2021
2mo ago php intermediate
PDOStatement::bindParam() vs bindValue() PHP 5.1+
Two PDO methods for binding variables to placeholders — bindParam() binds by reference (evaluated at execute), bindValue() binds by value (evaluated immediately).
2mo ago php intermediate
PHP Generators PHP 5.5+
Functions using yield that produce values lazily — one at a time — instead of building a complete array in memory.
2mo ago php intermediate
Test Doubles PHP 8.0+
Substitute objects used in tests to replace real dependencies — mocks, stubs, spies, fakes, and dummies each serve a different purpose.
2mo ago testing intermediate
Type Inference PHP 7.0+
The compiler's ability to automatically deduce the type of an expression without an explicit annotation, based on context and assigned values.
2mo ago compiler intermediate
Anonymous Functions / Closures (PHP 5.3) PHP 5.3+
PHP 5.3 introduced anonymous functions (closures) — function() {} expressions assignable to variables, passable as callbacks, and able to capture outer scope with use().
2mo ago php intermediate
APM — Application Performance Monitoring PHP 7.0+
APM tools (Datadog, New Relic, Blackfire) automatically instrument applications to profile code-level performance — identifying slow DB queries, N+1 problems, and method-level bottlenecks.
2mo ago observability intermediate
array_map / filter / reduce as FP Patterns PHP 5.3+
PHP's array_map(), array_filter(), and array_reduce() enable functional-style data transformation pipelines — cleaner than imperative loops for many common patterns.
2mo ago php intermediate
Attributes #[] Replacing Docblock Annotations PHP 8.0+
PHP 8.0 native attributes (#[Route('/home')]) replace fragile DocBlock @annotations — they're syntactically valid, parseable without reflection hacks, and supported by IDEs and static analysis.
2mo ago php intermediate
Authentication PHP 7.0+
The process of verifying that a user is who they claim to be — typically by validating credentials (password, token, certificate) and establishing a session or issuing a signed token for subsequent requests.
2mo ago security intermediate
Authorisation PHP 7.0+
The process of determining what an authenticated user is permitted to do — checking permissions, roles, or policies before allowing access to a resource or action.
2mo ago security intermediate
Caching Strategies PHP 7.0+
Patterns for when and how to store and invalidate cached data — cache-aside, write-through, write-behind, and read-through each make different trade-offs between consistency, complexity, and performance.
2mo ago performance intermediate
Cardinality in Observability PHP 7.0+
The number of unique combinations of label values in a metric — high cardinality (millions of unique label combinations) causes memory exhaustion in time-series databases and is the most common observability scaling problem.
2mo ago observability intermediate
Catastrophic Backtracking PHP 5.3+
A regex engine failure mode where certain patterns combined with specific inputs cause exponential backtracking, making the match take seconds or minutes — a common denial-of-service vector called ReDoS.
2mo ago regex intermediate
Collation & Locale-Aware Sorting PHP 7.0+
Locale-specific rules for ordering strings alphabetically — determining that ä sorts near a in German but after z in traditional Swedish, and that sorting must not rely on byte values for Unicode text.
2mo ago i18n intermediate
✓ schema.org compliant