Try Rector
Documentation
Hire Team
Blog
Contact
Try Rector
Documentation
Hire Team
Blog
Contact
Run Rector on your code to see what it can do for you:
// no change
PHP snippet to change
<?php namespace App; declare(ticks=1) { echo 'test'; throw new Exception(); echo 'unreachable'; }
Config
rector.php
<?php declare(strict_types=1); use Rector\Config\RectorConfig; use Rector\DeadCode\Rector\Stmt\RemoveUnreachableStatementRector; return RectorConfig::configure() ->withRules([RemoveUnreachableStatementRector::class]);
Run Rector
Rector version:
78e99a
- released at 2026-06-05 21:27