3v4l.org

run code in 300+ PHP versions simultaneously
<?php //::('\xF0\x9F\x98\x81') => '=?utf-8?Q?=F0=9F=91=8C?=' f($x) { return preg_replace('/\/x/', '=', $x); } echo f('\xF0\x9F\x98\x81')
Output for 7.0.0
Parse error: syntax error, unexpected 'return' (T_RETURN) in /in/MWodT on line 6
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected '{' in /in/MWodT on line 5
Process exited with code 255.

preferences:
169.14 ms | 1387 KiB | 24 Q