3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = "foo\x00bar\x00baz"; function showRawCharacters($result) { $resultInHex = unpack('H*', $result); $resultInHex = $resultInHex[1]; $resultSeparated = implode(', ', str_split($resultInHex, 2)); //byte safe echo $resultSeparated; } showRawCharacters($str1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/70jS8
function name:  (null)
number of ops:  5
compiled vars:  !0 = $str1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo%00bar%00baz'
   14     1        INIT_FCALL                                               'showrawcharacters'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function showrawcharacters:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/70jS8
function name:  showRawCharacters
number of ops:  19
compiled vars:  !0 = $result, !1 = $resultInHex, !2 = $resultSeparated
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'unpack'
          2        SEND_VAL                                                 'H%2A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    8     6        FETCH_DIM_R                                      ~5      !1, 1
          7        ASSIGN                                                   !1, ~5
    9     8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 '%2C+'
         10        INIT_FCALL                                               'str_split'
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 2
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !2, $8
   10    17        ECHO                                                     !2
   11    18      > RETURN                                                   null

End of function showrawcharacters

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.33 ms | 1389 KiB | 20 Q