PHP 8.x (8.0–8.3) thug feabhasúcháin mhóra a nua-aoiseach an teanga — feidhmíochán (JIT), cabhrú nua-bhreise comhréire, agus clóscríobh níos láidre. Tá sé tábhachtach na gníomhaireachtaí seo a thuiscint chun PHP nua-aimseartha, idiomatic a scríobh agus chun iad a aithint i bhfoinc-chóid nua-aimseartha. ## Príomhghnéithe PHP 8.0 ```php // 1. Named arguments — pass by parameter name, skip optional ones setCookie(name: "theme", value: "dark", httponly: true);
// 2. Constructor property promotion — declare + assign properties in the signature class Point { public function __construct(public int $x, public int $y) {} // no boilerplate }
// 3. Union types function process(int|string $id): void {}
// 4. The match expression — value-returning, strict, no fall-through $result = match($status) { 200, 201 => "success", 404 => "not found", default => "unknown", };
