1.2.1053. Return Typehint Usage¶
Spot usage of return typehint. It is a PHP 7.0 feature.
Return typehint were introduced in PHP 7.0, and are backward incompatible with PHP 5.x.
<?php
function foo($a) : stdClass {
return new \stdClass();
}
?>
See also RFC: Return Type Declarations and Return Type Declarations.
1.2.1053.1. Connex PHP features¶
1.2.1053.1.1. Specs¶
Short name |
Php/ReturnTypehintUsage |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
With PHP 7.0 and more recent |
Severity |
|
Time To Fix |
|
Changed Behavior |
PHP 7.0 |
Precision |
Very high |
Available in |