3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link https://stackoverflow.com/a/8314506/367456 */ $content = '\tThis variable is not set by me.\nCannot do anything about it.\n'; echo "input:\n======\n", $content, "\n\n", "output:\n=======\n", preg_replace_callback( '/\\\\([nrtvf\\\\$"]|[0-7]{1,3}|\x[0-9A-Fa-f]{1,2})/', fn($matches) => stripcslashes($matches[0]), $content ) ;

preferences:
34.19 ms | 406 KiB | 5 Q