From 07e16b1b2fc6a39c0e2d32b3fd131bb6bc4f0d64 Mon Sep 17 00:00:00 2001 From: Tim Bond Date: Wed, 30 Oct 2024 20:53:05 -0700 Subject: [PATCH 1/2] Add documentation for new MyClass()->method() without parentheses https://wiki.php.net/rfc/new_without_parentheses --- language/oop5/basic.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/language/oop5/basic.xml b/language/oop5/basic.xml index 3323eed1bca7..de04ea4db913 100644 --- a/language/oop5/basic.xml +++ b/language/oop5/basic.xml @@ -374,6 +374,8 @@ bool(true) format('Y'); +// surrounding parentheses are optional since 8.4 +echo new DateTime()->format('Y'); ?> ]]> From f15d6156351f280055fd2f22a1d182f0ece8d6e9 Mon Sep 17 00:00:00 2001 From: Tim Bond Date: Thu, 31 Oct 2024 13:05:29 -0700 Subject: [PATCH 2/2] Update language/oop5/basic.xml Co-authored-by: Christoph M. Becker --- language/oop5/basic.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/oop5/basic.xml b/language/oop5/basic.xml index de04ea4db913..9071a404f20e 100644 --- a/language/oop5/basic.xml +++ b/language/oop5/basic.xml @@ -374,7 +374,7 @@ bool(true) format('Y'); -// surrounding parentheses are optional since 8.4 +// surrounding parentheses are optional as of PHP 8.4.0 echo new DateTime()->format('Y'); ?> ]]>