diff --git a/reference/funchand/functions/forward-static-call-array.xml b/reference/funchand/functions/forward-static-call-array.xml index fcb899adbb32..cc763af464cc 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 an array of parameters, preserving the + current called class @@ -17,10 +18,12 @@ 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 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::. @@ -49,14 +52,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..45e52db712c8 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,16 @@ 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 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::. + @@ -39,9 +42,9 @@ args - - Zero or more parameters to be passed to the function. - + + Zero or more parameters to be passed to the callback. +