addslashes

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Quote string with slashes
<?php addslashes(string $string): string
<?php             $filename = (string) preg_replace_callback('~^(?P<drive>[a-z]+:\\\)~i', static fn (array $match): string => strtolower($match['drive']), $filename);

        }



        $filename = str_replace('\\\\', '\\', addslashes((string) realpath($filename)));

        $rootPath = TestSuite::getInstance()->rootPath;

        $relativePath = str_replace($rootPath.DIRECTORY_SEPARATOR, '', $filename);