PHP 8.3 is a major release in the evolution of PHP. It contains a lot of new features, such as typed constants, read-only classes improvements, new functions, and various execution speed enhancements.
Prior to PHP 8.3, it was impossible to define type constraints on class constants. This has been resolved, preventing unexpected variable types in constant validation loops.
class Config {
public const string SITE_NAME = 'A2Tutor';
}
You can now reinitialize readonly properties within the magic __clone method, allowing you to build deep clones of readonly objects.