Tag: php8
Named Arguments (PHP 8.0) PHP 8.0+
PHP 8.0 named arguments let you pass values by parameter name — skipping optional params, self-documenting calls, and enabling out-of-order argument passing.
2mo ago
php beginner
Named Arguments (PHP 8.0) PHP 8.0+
Pass arguments to a function by parameter name rather than position, improving readability and allowing optional parameters to be skipped.
2mo ago
php beginner
Named Arguments in Built-in PHP Functions PHP 8.0+
PHP 8.0 named arguments work with built-in functions — enabling readable calls to functions with many optional parameters like array_slice().
2mo ago
php intermediate
Named Arguments with Spread Operator PHP 8.1+
Combining PHP 8.0 named arguments with the ... spread operator to unpack associative arrays as named parameters.
2mo ago
php intermediate
never Return Type (PHP 8.1) PHP 8.1+
Declares that a function never returns normally — it always throws an exception or calls exit(), helping static analysers prove code paths.
2mo ago
php intermediate
never Return Type (PHP 8.1) PHP 8.1+
Declaring a function's return type as never signals it always throws or exits — enabling static analysers to prune unreachable code branches.
2mo ago
php intermediate
Null Safety — Null Object vs Optional PHP 7.1+
Strategies for eliminating null reference errors: the Null Object Pattern provides a safe default; Optional-style wrapping makes nullability explicit.
2mo ago
quality intermediate
Nullsafe Operator (?->) PHP 8.0+
Chains method calls and property accesses on potentially-null objects without nested null checks; returns null on the first null encounter.
2mo ago
php beginner
Nullsafe Operator Chaining (?->) PHP 8.0+
PHP 8.0's ?-> short-circuits an entire method chain to null when any step returns null — eliminating nested null checks.
2mo ago
php intermediate