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(
5139
5139
$ scopeToPass = $ closureBindScope ;
5140
5140
}
5141
5141
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) {
5143
5149
$ parameterCallImmediately = $ parameter ->isImmediatelyInvokedCallable ();
5144
5150
if ($ parameterCallImmediately ->maybe ()) {
5145
- $ callCallbackImmediately = $ calleeReflection instanceof FunctionReflection && ! $ calleeReflection -> isBuiltin () ;
5151
+ $ callCallbackImmediately = $ calleeReflection instanceof FunctionReflection;
5146
5152
} else {
5147
5153
$ callCallbackImmediately = $ parameterCallImmediately ->yes ();
5148
5154
}
5149
5155
} else {
5150
- $ callCallbackImmediately = $ calleeReflection instanceof FunctionReflection && ! $ calleeReflection -> isBuiltin () ;
5156
+ $ callCallbackImmediately = $ calleeReflection instanceof FunctionReflection;
5151
5157
}
5152
5158
5153
5159
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 {}
327
327
*/
328
328
function getopt(string $short_options, array $long_options = [], &$rest_index = null) {}
329
329
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