From 482f20b78bc717f0c75fb16c36d05df6990e94b8 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Wed, 27 Nov 2024 15:03:01 +0100 Subject: [PATCH 1/2] Emphasize arbitrary expressions in static initializer --- language/variables.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/language/variables.xml b/language/variables.xml index 5d061391617e..780eced85421 100644 --- a/language/variables.xml +++ b/language/variables.xml @@ -533,6 +533,11 @@ function foo(){ This means that static variables in methods now behave the same way as static properties. + + As of PHP 8.3.0, static variables can be initialized with arbitrary expressions. + This means that method calls, for example, can be used to initialize static variables. + + Usage of static Variables in Inherited Methods From d46693f4405eb17eaf968332cd23345cd8013db7 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Wed, 27 Nov 2024 18:28:10 +0000 Subject: [PATCH 2/2] Nits --- language/variables.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language/variables.xml b/language/variables.xml index 780eced85421..8896b416726f 100644 --- a/language/variables.xml +++ b/language/variables.xml @@ -533,10 +533,10 @@ function foo(){ This means that static variables in methods now behave the same way as static properties. - + As of PHP 8.3.0, static variables can be initialized with arbitrary expressions. This means that method calls, for example, can be used to initialize static variables. - + Usage of static Variables in Inherited Methods