DowngradeArrayAnyRector

Downgrade array_any() to foreach loop

-$found = array_any($animals, fn($animal) => str_starts_with($animal, 'c'));
+$found = false;
+foreach ($animals as $animal) {
+    if (str_starts_with($animal, 'c')) {
+        $found = true;
+        break;
+    }
+}

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DowngradePhp84\Rector\Expression\DowngradeArrayAnyRector;

return RectorConfig::configure()
    ->withRules([
        DowngradeArrayAnyRector::class,
    ]);