Brent 7/11/2024

New without parentheses in PHP 8.4

Read Original

The article details a new feature in PHP 8.4 that eliminates the need for parentheses when chaining methods, properties, or static calls on newly instantiated objects (e.g., `new MyClass()->method()`). It explains the syntax, covers edge cases like dynamic and anonymous classes, and notes the requirement for constructor brackets in most cases.

New without parentheses in PHP 8.4

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser