3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Have to double backslash to produce an actual single backslash $data = '\\u1F60A'; // UTF-8 encoding for \ is 5C -- string only has one echo bin2hex($data), PHP_EOL; // Display will differ depending on serialisation being used var_dump($data); print_r($data); echo PHP_EOL; var_export($data); echo PHP_EOL; echo json_encode($data), PHP_EOL;

preferences:
74.68 ms | 408 KiB | 5 Q