← 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
readonly Classes (PHP 8.2) PHP 8.2+
PHP 8.2 readonly classes make all promoted properties readonly automatically — the cleanest way to define immutable value objects and DTOs.
2mo ago php beginner
readonly Properties (PHP 8.1) PHP 8.1+
PHP 8.1 readonly properties can only be written once (in the constructor) — enforcing immutability without verbose accessor boilerplate.
2mo ago php beginner
register_globals Era & Why It Was Dangerous PHP 3.0+
PHP 4 shipped with register_globals=On by default — injecting GET/POST/COOKIE values as global variables, making PHP synonymous with insecurity until it was off-by-default in PHP 4.2.
2mo ago php intermediate
Return Type Declarations (PHP 7.0) PHP 7.0+
PHP 7.0 return type declarations (:int, :string, :void, :static, :never) enable functions to declare what they return — making return contract violations detectable at runtime and by static analysis.
2mo ago php beginner
Removed PHP Function PHP 7.0+
Calling a function removed in a newer PHP version — causes a fatal error on upgrade and blocks modernisation of the PHP runtime.
2mo ago php intermediate
random_bytes() PHP 7.0+
Generates cryptographically secure random bytes from the OS entropy source — use for tokens, salts, and nonces.
2mo ago php intermediate
Readonly Classes (PHP 8.2) PHP 8.2+
Marking an entire class readonly automatically makes all its declared properties readonly, simplifying immutable value object creation.
2mo ago php intermediate
Readonly Classes (PHP 8.2) PHP 8.2+
Marking an entire class readonly makes all its properties implicitly readonly — ideal for immutable value objects and DTOs with minimal boilerplate.
2mo ago php advanced
Readonly Properties (PHP 8.1) PHP 8.1+
Properties declared with readonly can only be initialised once and then never modified, enforcing immutability at the language level.
2mo ago php intermediate
realpath() PHP 5.0+
Resolves a path to its canonical absolute form, collapsing ../ sequences — used to prevent path traversal.
2mo ago php intermediate
Reflection API PHP 5.0+
PHP's built-in introspection system for examining classes, methods, properties, and parameters at runtime.
2mo ago php advanced
register_globals (Legacy Audit) PHP 5.0+
A removed PHP setting that automatically created global variables from GET/POST/COOKIE input, enabling trivial variable injection attacks.
CWE-473 OWASP A3:2021
2mo ago php beginner 9.8
✓ schema.org compliant