From c8f24767a784e04420bc801bc7bcbd93959f380e Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Tue, 14 Jul 2026 21:02:17 +0900 Subject: [PATCH 1/5] Clarify forward_static_call docs --- .../functions/forward-static-call-array.xml | 28 +++++++++++-------- .../functions/forward-static-call.xml | 20 +++++++------ 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/reference/funchand/functions/forward-static-call-array.xml b/reference/funchand/functions/forward-static-call-array.xml index fcb899adbb32..b5cc1d26052b 100644 --- a/reference/funchand/functions/forward-static-call-array.xml +++ b/reference/funchand/functions/forward-static-call-array.xml @@ -3,7 +3,8 @@ forward_static_call_array - Call a static method and pass the arguments as array + Call a callback with parameters as an array, forwarding late + static binding when available @@ -17,10 +18,13 @@ Calls a user defined function or method given by the callback parameter, with arguments passed as an array, similarly to call_user_func_array. - When called from within a method context, it uses the - late static binding. - When called outside a class context, it behaves like - call_user_func_array, without late static binding. + When called from within a method context and calling a method callback, + it forwards the current + late static binding, + so static:: inside the method resolves to the current + called class. This is useful for static method callbacks that should behave + like forwarding calls such as parent:: or + self::. @@ -49,14 +53,14 @@ args - - One parameter, gathering all the method parameter in one array. - + + The parameters to be passed to the callback, as an array. + - - Note that the parameters for forward_static_call_array are - not passed by reference. - + + To pass a parameter by reference, the corresponding element in + args must be a reference. + diff --git a/reference/funchand/functions/forward-static-call.xml b/reference/funchand/functions/forward-static-call.xml index 4a89c8568124..5f399bb3acc8 100644 --- a/reference/funchand/functions/forward-static-call.xml +++ b/reference/funchand/functions/forward-static-call.xml @@ -3,7 +3,7 @@ forward_static_call - Call a static method + Call a callback while preserving the current called class @@ -13,13 +13,17 @@ callablecallback mixedargs - + Calls a user defined function or method given by the callback parameter, with the following arguments. This function must be called within a method context, it can't be used outside a class. - It uses the late static - binding. - + When calling a method callback, it forwards the current + late static binding, + so static:: inside the method resolves to the current + called class. This is useful for static method callbacks that should behave + like forwarding calls such as parent:: or + self::. + @@ -39,9 +43,9 @@ args - - Zero or more parameters to be passed to the function. - + + Zero or more parameters to be passed to the callback. + From c952122ccb1ee258b365bcb0c8cb51d8448c8dd4 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sat, 22 Aug 2026 00:19:14 +0900 Subject: [PATCH 2/5] Update reference/funchand/functions/forward-static-call-array.xml Co-authored-by: Louis-Arnaud --- reference/funchand/functions/forward-static-call-array.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/funchand/functions/forward-static-call-array.xml b/reference/funchand/functions/forward-static-call-array.xml index b5cc1d26052b..105458b62ae6 100644 --- a/reference/funchand/functions/forward-static-call-array.xml +++ b/reference/funchand/functions/forward-static-call-array.xml @@ -3,8 +3,8 @@ forward_static_call_array - Call a callback with parameters as an array, forwarding late - static binding when available + Call a callback with an array of parameters, preserving the + current called class From edbba27fd016c1858449928d60c91eab3c16f4d2 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sat, 22 Aug 2026 00:19:26 +0900 Subject: [PATCH 3/5] Update reference/funchand/functions/forward-static-call-array.xml Co-authored-by: Louis-Arnaud --- .../funchand/functions/forward-static-call-array.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/reference/funchand/functions/forward-static-call-array.xml b/reference/funchand/functions/forward-static-call-array.xml index 105458b62ae6..8bb4203f1bf2 100644 --- a/reference/funchand/functions/forward-static-call-array.xml +++ b/reference/funchand/functions/forward-static-call-array.xml @@ -19,12 +19,11 @@ parameter, with arguments passed as an array, similarly to call_user_func_array. When called from within a method context and calling a method callback, - it forwards the current - late static binding, - so static:: inside the method resolves to the current - called class. This is useful for static method callbacks that should behave - like forwarding calls such as parent:: or - self::. + it makes a + forwarding call, + so static:: inside the method resolves to the same called + class as in the caller. This is useful for static method callbacks that + should behave like self:: or parent::. From a7fc5289d464c63226d5c675693f4a9931a39c51 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sat, 22 Aug 2026 00:19:34 +0900 Subject: [PATCH 4/5] Update reference/funchand/functions/forward-static-call.xml Co-authored-by: Louis-Arnaud --- reference/funchand/functions/forward-static-call.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/reference/funchand/functions/forward-static-call.xml b/reference/funchand/functions/forward-static-call.xml index 5f399bb3acc8..45e52db712c8 100644 --- a/reference/funchand/functions/forward-static-call.xml +++ b/reference/funchand/functions/forward-static-call.xml @@ -17,12 +17,11 @@ Calls a user defined function or method given by the callback parameter, with the following arguments. This function must be called within a method context, it can't be used outside a class. - When calling a method callback, it forwards the current - late static binding, - so static:: inside the method resolves to the current - called class. This is useful for static method callbacks that should behave - like forwarding calls such as parent:: or - self::. + When calling a method callback, it makes a + forwarding call, + so static:: inside the method resolves to the same called + class as in the caller. This is useful for static method callbacks that + should behave like self:: or parent::. From 213afa1f23b9ab488ffd70cedf065811ab186085 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Fri, 21 Aug 2026 20:09:29 +0200 Subject: [PATCH 5/5] Apply suggestion from @lacatoire --- reference/funchand/functions/forward-static-call-array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/funchand/functions/forward-static-call-array.xml b/reference/funchand/functions/forward-static-call-array.xml index 8bb4203f1bf2..cc763af464cc 100644 --- a/reference/funchand/functions/forward-static-call-array.xml +++ b/reference/funchand/functions/forward-static-call-array.xml @@ -3,7 +3,7 @@ forward_static_call_array - Call a callback with an array of parameters, preserving the + Call a callback with an array of parameters, preserving the current called class