3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input = '😍'; echo bin2hex($input) . PHP_EOL; echo json_encode($input) . PHP_EOL; echo json_encode($input[0] . $input[1] . $input[2] . $input[3]) . PHP_EOL;
Output for 5.2.0 - 7.1.0
f09f988d "\ud83d\ude0d" "\ud83d\ude0d"
Output for 5.0.2 - 5.1.6
f09f988d Fatal error: Call to undefined function json_encode() in /in/cLiSf on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/cLiSf on line 4 f09f988dPHP_EOL Fatal error: Call to undefined function json_encode() in /in/cLiSf on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
f09f988d Fatal error: Call to undefined function: json_encode() in /in/cLiSf on line 5
Process exited with code 255.
Output for 4.3.10 - 4.4.4
f09f988d Fatal error: Call to undefined function: json_encode() in /in/cLiSf on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/cLiSf on line 4 f09f988dPHP_EOL Fatal error: Call to undefined function: json_encode() in /in/cLiSf on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/cLiSf on line 4 f09f988dPHP_EOL Fatal error: Call to undefined function: json_encode() in /in/cLiSf on line 5