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 ) ;
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
input: ====== \tThis variable is not set by me.\nCannot do anything about it.\n output: ======= This variable is not set by me. Cannot do anything about it.
Output for 7.3.0 - 7.3.33
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')' in /in/tejgO on line 21
Process exited with code 255.

preferences:
157.95 ms | 407 KiB | 5 Q