← CodeClarityLab Home
Browse by Category
+ added · updated 7d
✕ Clear 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
Prompt Caching
API feature where a static prompt prefix (system instructions, large context) is cached server-side, dramatically reducing cost and latency on repeated calls that share the prefix.
1w ago ai_ml intermediate
PDO Error Handling PHP 5.1+
PDO has three error modes — silent, warning, and exception — controlling how database errors surface.
1mo ago php beginner
PDO Fetch Modes PHP 5.1+
Constants controlling how PDO returns rows — as arrays, objects, or custom classes.
1mo ago php beginner
PDO lastInsertId() PHP 5.1+
Returns the auto-increment ID generated by the most recent INSERT statement.
1mo ago php beginner
PDO Named Placeholders PHP 5.1+
Named parameters (:name) in prepared statements — more readable than positional ? placeholders for queries with multiple parameters.
1mo ago php beginner
PDO query() vs prepare() PHP 5.1+
PDO query() executes raw SQL immediately — prepare() parameterises it. query() must never include user-controlled values.
CWE-89 OWASP A3:2021
1mo ago php beginner 9.8
Diagram: PDO Transactions PDO Transactions PHP 5.1+
PDO wraps multiple queries in an atomic unit — either all succeed or all roll back.
1mo 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
1mo 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).
1mo ago php intermediate
PDOStatement::rowCount() PHP 5.1+
Returns the number of rows affected by the last DELETE, INSERT, or UPDATE — unreliable for SELECT.
1mo ago php beginner
PHP Generators PHP 5.5+
Functions using yield that produce values lazily — one at a time — instead of building a complete array in memory.
1mo ago php intermediate
Diagram: Prompt Injection Attack Prompt Injection Attack
An attack where crafted user input overrides or hijacks an LLM's system instructions, causing it to ignore its intended behaviour and follow attacker-supplied commands instead.
CWE-74 OWASP LLM01:2025
1mo ago ai_ml advanced
Diagram: PHP Fibers — Internals & Scheduler Patterns PHP Fibers — Internals & Scheduler Patterns PHP 8.1+
How PHP Fibers work under the hood — stack allocation, suspension mechanics, and how to build a cooperative multitasking scheduler on top of the Fiber API introduced in PHP 8.1.
1mo ago php advanced
prefers-reduced-motion — Accessible Animations
A CSS media query and JavaScript API that detects when a user has requested reduced motion in their OS settings, allowing you to disable or simplify animations that can trigger vestibular disorders.
1mo ago accessibility beginner
P50/P95/P99 Latency Percentiles
Latency percentiles (P50, P95, P99) tell you what most users experience — P99 means '99% of requests are faster than this', revealing the worst experiences that averages hide.
2mo ago observability beginner
Page Visibility API HTML5
The Page Visibility API tells you when a tab is hidden or visible — use it to pause animations, polls, and video when the user switches tabs.
2mo ago javascript beginner
password_hash() — Native Bcrypt (PHP 5.5) PHP 5.5+
PHP 5.5 added password_hash() and password_verify() — the only correct way to hash and verify passwords. Never use MD5, SHA1, or unsalted hashes.
2mo ago php beginner
PCNTL Signals in CLI PHP PHP 7.1+
The PCNTL extension lets CLI PHP scripts handle OS signals (SIGTERM, SIGINT, SIGUSR1) — enabling graceful shutdown and hot reload in long-running daemons.
2mo ago php advanced
Permissions API HTML5
The Permissions API (navigator.permissions.query()) lets you check the current state of browser permissions — granted, denied, or prompt — before requesting sensitive APIs.
2mo ago javascript intermediate
Pessimistic Locking
Pessimistic locking acquires an exclusive lock immediately on read — preventing any concurrent modification. Right for high-contention scenarios but reduces throughput.
2mo ago concurrency intermediate
✓ schema.org compliant