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;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XWh0O
function name:  (null)
number of ops:  23
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%5Cu1F60A'
    6     1        INIT_FCALL                                               'bin2hex'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ECHO                                                     $2
          5        ECHO                                                     '%0A'
    9     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   10     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12        ECHO                                                     '%0A'
   11    13        INIT_FCALL                                               'var_export'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16        ECHO                                                     '%0A'
   12    17        INIT_FCALL                                               'json_encode'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $6      
         20        ECHO                                                     $6
         21        ECHO                                                     '%0A'
   13    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.17 ms | 1014 KiB | 18 Q