1.2.465. First Class Callable¶
A syntax using ellipsis was introduced to make it easy to make a method into a callable.
<?php
// Using ellipsis as the only argument
$a = $object->method(...);
// Old style equivalent
$a = array($object, 'method');
// calling the closure.
$a();
?>
See also PHP RFC: First-class callable syntax.
1.2.465.1. Connex PHP features¶
1.2.465.1.1. Specs¶
Short name |
Php/FirstClassCallable |
Rulesets |
|
Exakat since |
2.3.0 |
PHP Version |
With PHP 8.1 and more recent |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |