File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -5139,15 +5139,21 @@ private function processArgs(
51395139 $ scopeToPass = $ closureBindScope ;
51405140 }
51415141
5142- if ($ parameter instanceof ExtendedParameterReflection) {
5142+ if (
5143+ $ parameterType === null
5144+ || $ parameterType instanceof MixedType
5145+ || $ parameterType ->isCallable ()->no ()
5146+ ) {
5147+ $ callCallbackImmediately = false ;
5148+ } elseif ($ parameter instanceof ExtendedParameterReflection) {
51435149 $ parameterCallImmediately = $ parameter ->isImmediatelyInvokedCallable ();
51445150 if ($ parameterCallImmediately ->maybe ()) {
5145- $ callCallbackImmediately = $ calleeReflection instanceof FunctionReflection && ! $ calleeReflection -> isBuiltin () ;
5151+ $ callCallbackImmediately = $ calleeReflection instanceof FunctionReflection;
51465152 } else {
51475153 $ callCallbackImmediately = $ parameterCallImmediately ->yes ();
51485154 }
51495155 } else {
5150- $ callCallbackImmediately = $ calleeReflection instanceof FunctionReflection && ! $ calleeReflection -> isBuiltin () ;
5156+ $ callCallbackImmediately = $ calleeReflection instanceof FunctionReflection;
51515157 }
51525158
51535159 if ($ arg ->value instanceof Expr \Closure) {
Original file line number Diff line number Diff line change @@ -327,3 +327,14 @@ function get_defined_constants(bool $categorize = false): array {}
327327 */
328328function getopt(string $short_options, array $long_options = [], &$rest_index = null) {}
329329
330+ /**
331+ * @param callable|int $handler
332+ * @param-later-invoked-callable $handler
333+ */
334+ function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): bool {}
335+
336+ /**
337+ * @param-later-invoked-callable $callback
338+ * @return string|array|object|null
339+ */
340+ function set_error_handler(?callable $callback, int $error_levels = E_ALL) {}
You can’t perform that action at this time.
0 commit comments