Explore PHP 8.4: New Features & Try Them in a Sandbox
Discover PHP 8.4's new features and enhancements. Test them in our sandbox to experience improved performance and syntax innovations firsthand.
PHP Code Editor
Execution Result
Ready to execute
Click the "Run Script" button to see the output here
Description
Test PHP 8.4 New Features Online
Experience the latest innovations in PHP 8.4 by testing its new features online! Our interactive sandbox allows you to explore enhanced performance, improved syntax, and exciting functionalities directly in your browser.
Whether you’re a developer looking to upgrade your skills or a hobbyist eager to experiment, this is your opportunity to get hands-on with PHP 8.4. Start testing today and see how these enhancements can elevate your web development projects!
- New Array Find Functions in PHP 8.4
- Property Hooks in PHP 8.4
- Class instantiation without extra parenthesis in PHP 8.4
- New mb_trim functions
- New mb_ucfirst() and mb_lcfirst() functions
- Asymmetric Property Visibility in PHP 8.4
And more…
New Array Find Functions
PHP 8.4 will come with new array find functions that include:
array_find()
array_find_key()
array_any()
array_all()
PHP Property Hooks
Property hooks are inspired by languages like Kotlin, C#, and Swift, and the syntax includes two syntax variants that resemble short and multi-line closures.
new MyClass()->method() without parentheses
Since member access during instantiation was introduced, you must wrap the new MyClass() call in parentheses, or you’ll get a parse error. The proposed syntax would allow you to access constants, properties, and methods without the extra parentheses:
Comments
No comments yet
Be the first to share your thoughts!