NullToStrictStringFuncCallArgRector

Change null to strict string defined function call args

 class SomeClass
 {
     public function run()
     {
-        preg_split("#a#", null);
+        preg_split("#a#", '');
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;

return RectorConfig::configure()
    ->withRules([
        NullToStrictStringFuncCallArgRector::class,
    ]);
SETS:  PHP 8.1