Share:
PHP 8.4 New Features
Important innovations are coming with PHP 8.4 version:
Property Hooks
It becomes possible to define getter/setter directly to class properties.
class User {
public string $name {
set(string $value) => ucfirst($value);
get => $this->name;
}
}
Asymmetric Visibility
Different visibility levels can be defined for properties.
Performance Improvements
15-20% performance increase is achieved with JIT compiler improvements.