Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
Rector run Failed:
{ "totals": { "changed_files": 0, "errors": 1 }, "errors": [ { "message": "System error: \"empty branch\"\nRun Rector with \"--debug\" option and post the report here: https://github.com/rectorphp/rector/issues/new", "file": "/var/www/storage/demo/nyz4u6uz24fuudlfl5io/rector_analyzed_file.php", "line": 140 } ] }
Run Rector on your code to see what it can do for you:
PHP snippet to change
<?php // If there was a font color or size change, change the font tag now. if(@ereg("(\\\cf[0-9])||(\\\fs[0-9][0-9])", $tags)) { $html .= '</font><font size="'.$size.'" color="'.$color.'">'; }
Config
rector.php
<?php declare(strict_types=1); use Rector\Config\RectorConfig; use Rector\Php70\Rector\FuncCall\EregToPregMatchRector; return RectorConfig::configure() ->withRules([EregToPregMatchRector::class]);
Run Rector
Rector version:
fa0a9a
- released at 2025-07-30 22:14