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($char); // char 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/Hvg0u
function name:  (null)
number of ops:  29
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        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'bin2hex'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                                 
    8    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'hexdec'
         21        INIT_FCALL                                               'bin2hex'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $9      
         24        SEND_VAR                                                 $9
         25        DO_ICALL                                         $10     
         26        SEND_VAR                                                 $10
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.71 ms | 1399 KiB | 23 Q