php-traits
php-traits copied to clipboard
inconsistent callables
https://wiki.php.net/rfc/consistent_callables
function foo(callable $callable){
// ...
}
foo('trim'); // -> Argument 1 passed to foo() must be callable, string given
foo([$obj, 'method']); // -> Argument 1 passed to foo() must be callable, array given
Both cases work fine on PHP 7.2/Windows, but break on linux.