Tag: php81
🤖 AI Guestbook — #php81 educational data only
|
|
Last 30 days
Agents 10
Amazonbot 1
Amazonbot 83Perplexity 55ChatGPT 41Unknown AI 40Google 39Ahrefs 13Claude 12SEMrush 6Meta AI 4
Most referenced — #php81
Enum::cases() & Enum from()/tryFrom() 2Intersection & DNF Types in Practice 1readonly Properties (PHP 8.1) 1callable vs Closure vs First-Class Callable 1Enums Implementing Interfaces 1Spread Operator in Arrays [...$a, ...$b] 1Enums — First-Class Enumerations (PHP 8.1) 1PHP Fibers — Internals & Scheduler Patterns 1
Fibers — Cooperative Concurrency (PHP 8.1) 46Fiber-Based Task Scheduler 32PHP Fibers — Internals & Scheduler Patterns 31Enums — First-Class Enumerations (PHP 8.1) 27Enum::cases() & Enum from()/tryFrom() 23Intersection & DNF Types in Practice 22Enums Implementing Interfaces 21callable vs Closure vs First-Class Callable 19
How they use it
crawler 256
crawler_json 21
pre-tracking 16
Tag total293 pings
Terms pinged12 / 12
Distinct agents8
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.
2mo ago
php advanced
Enums — First-Class Enumerations (PHP 8.1) PHP 8.1+
PHP 8.1 native enums replace class constant hacks — providing type-safe, enumerable, matchable values with optional backing values (: string or : int).
2mo ago
php intermediate
Fibers — Cooperative Concurrency (PHP 8.1) PHP 8.1+
PHP 8.1 Fibers enable cooperative multitasking — suspending execution at yield points and resuming later — the foundation for async PHP frameworks without OS threads.
2mo ago
php advanced
Intersection & DNF Types in Practice PHP 8.1+
PHP 8.1 intersection types (A&B) and PHP 8.2 DNF types ((A&B)|null) allow precise type constraints for objects implementing multiple interfaces.
2mo ago
php advanced
Named Arguments in Attributes PHP 8.1+
PHP 8.1+ allows named arguments inside attribute constructors — #[Route(path: '/home', methods: ['GET'])] — making attribute usage self-documenting.
2mo ago
php intermediate
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
callable vs Closure vs First-Class Callable PHP 7.1+
PHP has three callable forms: loose callable (string/array), typed Closure, and PHP 8.1 first-class callables (strlen(...)) — prefer Closure or first-class callables for type safety.
2mo ago
php intermediate
Constructor Promotion + readonly Together PHP 8.1+
PHP 8.1+ allows readonly in constructor promotion: public function __construct(public readonly string $name) — the cleanest way to write immutable value objects.
2mo ago
php intermediate
Enum::cases() & Enum from()/tryFrom() PHP 8.1+
Backed enums provide from() (throws on miss) and tryFrom() (returns null) for value lookup, plus cases() to get all cases — essential for forms and validation.
2mo ago
php intermediate
Enums Implementing Interfaces PHP 8.1+
PHP 8.1 enums can implement interfaces, allowing them to be used wherever an interface is expected — enabling polymorphic enum-based dispatch.
2mo ago
php intermediate
Spread Operator in Arrays [...$a, ...$b] PHP 8.1+
PHP 8.1+ allows the spread operator ... inside array literals to merge arrays — cleaner than array_merge() for combining arrays inline.
2mo ago
php beginner
Fiber-Based Task Scheduler PHP 8.1+
Building a cooperative multitasking scheduler with PHP Fibers — suspending and resuming tasks at I/O wait points to run multiple tasks concurrently in a single thread.
2mo ago
php advanced