Open
Description
Description
The following code:
<?php
declare(strict_types=1);
namespace Foo;
// strlen() will be called with strict_types=0, so this is legal.
var_dump(call_user_func('strlen', false));
// Called with strict_types=1
var_dump(\call_user_func('strlen', false));
Resulted in this output:
int(0)
Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, false given in /in/bcCZ4:10
Stack trace:
#0 /in/bcCZ4(10): strlen(false)
#1 {main}
thrown in /in/bcCZ4 on line 10
But I expected this output instead:
Well, not sure, it should be consistent I suppose
PHP Version
8.3+
Operating System
No response