1.2.118. Cast Unset Usage¶
Usage of the (unset) cast operator was removed. The operator was deprecated since PHP 7.2.0.
<?php
$a = 1;
(unset) $a;
// functioncall is OK
unset($a);
?>
See also Unset casting.
1.2.118.2. Connex PHP features¶
1.2.118.2.1. Suggestions¶
Replace (unset) with a call to unset().
Remove the unset call altogether.
Set the value to NULL.
1.2.118.2.2. Specs¶
Short name |
Php/CastUnsetUsage |
Rulesets |
|
Exakat since |
2.1.8 |
PHP Version |
With PHP 8.0 and older |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |