Find the best Rector rule to solve your problem. Searching through 754 rules.

Found 4 rules:

Utf8DecodeEncodeToMbConvertEncodingRector

Change deprecated utf8_decode() and utf8_encode() to mb_convert_encoding()

-utf8_decode($value);
-utf8_encode($value);
+mb_convert_encoding($value, 'ISO-8859-1');
+mb_convert_encoding($value, 'UTF-8', 'ISO-8859-1');
SETS:  PHP 8.2

VariableInStringInterpolationFixerRector

Replace deprecated ${var} to {$var}

 $c = "football";
-echo "I like playing ${c}";
+echo "I like playing {$c}";
SETS:  PHP 8.2

FilesystemIteratorSkipDotsRector

Prior PHP 8.2 FilesystemIterator::SKIP_DOTS was always set and could not be removed, therefore FilesystemIterator::SKIP_DOTS is added in order to keep this behaviour

-new FilesystemIterator(__DIR__, FilesystemIterator::KEY_AS_FILENAME);
+new FilesystemIterator(__DIR__, FilesystemIterator::KEY_AS_FILENAME | FilesystemIterator::SKIP_DOTS);
SETS:  PHP 8.2

ReadOnlyClassRector

Decorate read-only class with readonly attribute

-final class SomeClass
+final readonly class SomeClass
 {
     public function __construct(
-        private readonly string $name
+        private string $name
     ) {
     }
 }
SETS:  PHP 8.2