Find the best Rector rule to solve your problem. Searching through 766 rules.

Found 3 rules:

DirNameFileConstantToDirConstantRector

Convert dirname(__FILE__) to __DIR__

 class SomeClass
 {
     public function run()
     {
-        return dirname(__FILE__);
+        return __DIR__;
     }
 }
SETS:  PHP 5.3

ReplaceHttpServerVarsByServerRector

Rename old $HTTP_* variable names to new replacements

-$serverVars = $HTTP_SERVER_VARS;
+$serverVars = $_SERVER;
SETS:  PHP 5.3

TernaryToElvisRector

Use ?: instead of ?, where useful

 function elvis()
 {
-    $value = $a ? $a : false;
+    $value = $a ?: false;
 }
SETS:  PHP 5.3