Tag: php
Undefined Array Key / Offset Errors
PHP 4.0+
Accessing a non-existent array key triggers E_WARNING (PHP 7) or is silently null (PHP 8 with nullsafe) — use isset(), array_key_exists(), or ?? to guard access.
3mo ago
PHP beginner
Undefined Variable and Null Coalescing Fixes
PHP 5.0+
1
Accessing an undefined variable in PHP returns null and triggers an E_WARNING — use isset(), empty(), or ?? to check safely before use.
3mo ago
PHP beginner
Unicode & Multibyte Regex
PHP 5.3+
2
The u flag enables UTF-8 mode and \p{} Unicode property classes — essential for correctly matching text in any language.
3mo ago
Regex intermediate
Unreachable Code
PHP 5.0+
Code that can never execute because it follows a return, throw, exit, or an always-true condition — a sign of logic errors or forgotten cleanup.
3mo ago
Code Quality beginner
Unused Function
PHP 7.0+
A function or method that is defined but never called — dead code that increases maintenance burden and confuses readers about what is part of the active API.
3mo ago
Code Quality beginner
Unused Variable
PHP 5.0+
A variable that is assigned but never read — indicating a logic error, incomplete refactoring, or unnecessary computation.
3mo ago
Code Quality beginner
Unicode Fundamentals
PHP 5.0+
6
Unicode assigns every character a code point — UTF-8 encodes these as 1-4 bytes, making it the universal encoding for text on the web.
3mo ago
i18n intermediate
Union Types (PHP 8.0)
PHP 8.0+
2
Allow a parameter, return value, or property to accept multiple specified types, declared as TypeA|TypeB.
3mo ago
PHP intermediate
Unit Testing
PHP 5.0+
2
Automated tests that verify individual units of code (classes, methods) in isolation from external dependencies.
3mo ago
Testing beginner
Integrating LLM APIs (OpenAI, Anthropic, Gemini) into PHP applications — for text generation, classification, extraction, and embedding-based search.
3mo ago
AI / ML intermediate