Configurable

FuncCallToConstFetchRector

Changes use of function calls to use constants

 class SomeClass
 {
     public function run()
     {
-        $value = php_sapi_name();
+        $value = PHP_SAPI;
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Transform\Rector\FuncCall\FuncCallToConstFetchRector;

return RectorConfig::configure()
    ->withConfiguredRule(FuncCallToConstFetchRector::class, [
        'php_sapi_name' => 'PHP_SAPI',
    ]);
SETS:  Coding Style