Run Rector on your code to see what it can do for you:

 
 foreach ([1, 2, 3] as $value) {
     try {
-        $body = null;
         $body = get_body();
         var_dump($body);
     } catch (Exception) {
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: eac1ef - released at 2026-02-01 16:47