
Rule is_null
ΒΆ
Replaces is_null($var)
expression with null === $var
.
WarningΒΆ
Using this rule is riskyΒΆ
Risky when the function is_null
is overridden.
ExamplesΒΆ
Example #1ΒΆ
--- Original
+++ New
<?php
-$a = is_null($b);
+$a = null === $b;
Rule setsΒΆ
The rule is part of the following rule sets: