PHP 8.3 GA
PHP 8.3 已正式发布。主要变化包括: 类常量显式类型 (Typed class constants) 只读属性深拷贝 新增#[\Override]属性 新增json_validate()函数 添加Randomizer::getBytesFromString()方法 添加Randomizer::getFloat()和Randomizer::nextFloat()方法 以及更好的性能、更好的语法、改进类型安全 下面介绍部分语法的变化。 类型化类常量 PHP < 8.3 interface I { // We may naively assume that the PHP constant is always a string. const PHP = 'PHP 8.2'; } class Foo implements I { // But implementing classes may define it as an array. const PHP = []; } PHP 8.3 interface I { const string PHP = ...

