3v4l.org

run code in 300+ PHP versions simultaneously
<?php mb_internal_encoding("UTF-8"); $string = "\0"; $char = mb_substr($string, 0, 1); var_dump(bin2hex($char)); //hex var_dump(hexdec(bin2hex($char))); //decimal
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KOrSf
function name:  (null)
number of ops:  26
compiled vars:  !0 = $string, !1 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'mb_internal_encoding'
          1        SEND_VAL                                                 'UTF-8'
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, '%00'
    5     4        INIT_FCALL                                               'mb_substr'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 1
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
    6    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'bin2hex'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
    7    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'hexdec'
         18        INIT_FCALL                                               'bin2hex'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $8      
         21        SEND_VAR                                                 $8
         22        DO_ICALL                                         $9      
         23        SEND_VAR                                                 $9
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.36 ms | 1395 KiB | 23 Q