PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

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

Last modified: 16 May 2022

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.