New without parentheses in PHP 8.4
Read OriginalThe 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.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser