Inspectopedia
 
2024.3

'Closure::fromCallable()' can be converted to the first-class callable syntax

Info
New
Last modified: 03 December 2024

Reports the callable creation expressions that use Closure::fromCallable but can be replaced with first-class callable syntax f(...) available since PHP 8.1.

See First-class callable syntax (php.net) for details.