3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Hello World!'; var_dump(\unpack('A16', \pack('A16', $str))[1]); // Decoding "space padded string" strips added spaces var_dump(\unpack('a16', \pack('A16', $str))[1]); // Decoding "null padded string" leaves them there
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MFdit
function name:  (null)
number of ops:  26
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hello+World%21'
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'unpack'
          3        SEND_VAL                                                 'A16'
          4        INIT_FCALL                                               'pack'
          5        SEND_VAL                                                 'A16'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        FETCH_DIM_R                                      ~4      $3, 1
         11        SEND_VAL                                                 ~4
         12        DO_ICALL                                                 
    6    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'unpack'
         15        SEND_VAL                                                 'a16'
         16        INIT_FCALL                                               'pack'
         17        SEND_VAL                                                 'A16'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $6      
         20        SEND_VAR                                                 $6
         21        DO_ICALL                                         $7      
         22        FETCH_DIM_R                                      ~8      $7, 1
         23        SEND_VAL                                                 ~8
         24        DO_ICALL                                                 
    7    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.66 ms | 1399 KiB | 19 Q