3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "testing\n", PHP_EOL, 'testing\n', PHP_EOL; echo urlencode("testing\n"), PHP_EOL, urlencode('testing\n'), PHP_EOL; echo addcslashes("testing\n", '\n'), PHP_EOL, addcslashes('testing\n', '\n'), PHP_EOL; echo urlencode(addcslashes("testing\n", '\n')), PHP_EOL, urlencode(addcslashes('testing\n', '\n')), PHP_EOL; echo addcslashes("testing\n", "\n"), PHP_EOL, addcslashes('testing\n', "\n"), PHP_EOL; echo urlencode(addcslashes("testing\n", "\n")), PHP_EOL, urlencode(addcslashes('testing\n', "\n")), PHP_EOL;
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
testing testing\n testing%0A testing%5Cn testi\ng testi\ng\\\n testi%5Cng%0A testi%5Cng%5C%5C%5Cn testing\n testing\n testing%5Cn testing%5Cn

preferences:
104.85 ms | 1604 KiB | 4 Q