Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Translate characters or replace substrings
<?php strtr(string $string, string $from, string $to): string
<?php             [$filename, $content] = $snapshots->get();



            Assert::assertSame(

                strtr($content, ["\r\n" => "\n", "\r" => "\n"]),

                strtr($string, ["\r\n" => "\n", "\r" => "\n"]),

                $message === '' ? "Failed asserting that the string value matches its snapshot ($filename)." : $message

            );
<?php             Assert::assertSame(

                strtr($content, ["\r\n" => "\n", "\r" => "\n"]),

                strtr($string, ["\r\n" => "\n", "\r" => "\n"]),

                $message === '' ? "Failed asserting that the string value matches its snapshot ($filename)." : $message

            );

        } else {