Go Back
06/24/24
Php8.3. Better performance, better syntax, improved type safety.
PHP 8.3 continues to build on the improvements introduced in earlier versions of PHP 8, bringing new features, performance enhancements, and deprecations to keep the language modern and efficient.
PHP 8.3 is a major update of the PHP language.
It contains many new features, such as explicit typing of class constants, deep-cloning of readonly properties and additions to the randomness functionality. As always it also includes performance improvements, bug fixes, and general cleanup.
PHP 8.3 is a major update of the PHP language.
It contains many new features, such as explicit typing of class constants, deep-cloning of readonly properties and additions to the randomness functionality. As always it also includes performance improvements, bug fixes, and general cleanup.
Improvements
Performance Enhancements:
- Various performance improvements have been made under the hood, making PHP 8.3 faster and more efficient.
Generator Performance:
- Generators have been optimized for better performance, particularly in scenarios involving large data sets or complex iterations.
Improved Initializer Support for Attributes:
- Attributes now support more types of initializers, including closures and objects.
Deprecations and Removals
Deprecation of Ticks:
- The
declare(ticks=1)
directive is deprecated in PHP 8.3 and will be removed in future versions. Alternatives should be considered for the same functionality.
- The
Deprecated Functions:
- Several older functions have been deprecated, encouraging the use of modern alternatives. For example,
utf8_encode
andutf8_decode
are deprecated.
- Several older functions have been deprecated, encouraging the use of modern alternatives. For example,
Syntax and Language Changes
Named Arguments with Variadic Functions:
- Improvements in handling named arguments in variadic functions make the language more consistent and intuitive.
Flexible Heredoc and Nowdoc Syntaxes:
- Heredoc and Nowdoc syntaxes are more flexible and consistent, especially in edge cases.
Standalone Null, False, and True Types:
- The types
null
,false
, andtrue
can now be used as standalone types in type declarations.
- The types
Standard Library Updates
New Functions:
- Several new functions have been added to the standard library, providing more tools and utilities for developers.
Improved Error Handling:
- Error handling in certain standard library functions has been improved for better consistency and reliability.
Written by:
php