diff --git a/language/oop5/basic.xml b/language/oop5/basic.xml index 3323eed1bca7..9071a404f20e 100644 --- a/language/oop5/basic.xml +++ b/language/oop5/basic.xml @@ -374,6 +374,8 @@ bool(true) format('Y'); +// surrounding parentheses are optional as of PHP 8.4.0 +echo new DateTime()->format('Y'); ?> ]]>