3v4l.org

run code in 300+ PHP versions simultaneously
<?php function from_little_uint16_t(string $i): int { $arr = unpack ( 'vuint16_t', $i ); return $arr ['uint16_t']; } $i=from_little_uint16_t(hex2bin("3703")); var_dump($i);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V6vri
function name:  (null)
number of ops:  11
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'from_little_uint16_t'
          1        INIT_FCALL                                               'hex2bin'
          2        SEND_VAL                                                 '3703'
          3        DO_ICALL                                         $1      
          4        SEND_VAR                                                 $1
          5        DO_FCALL                                      0  $2      
          6        ASSIGN                                                   !0, $2
    8     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function from_little_uint16_t:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V6vri
function name:  from_little_uint16_t
number of ops:  11
compiled vars:  !0 = $i, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'unpack'
          2        SEND_VAL                                                 'vuint16_t'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
    5     6        FETCH_DIM_R                                      ~4      !1, 'uint16_t'
          7        VERIFY_RETURN_TYPE                                       ~4
          8      > RETURN                                                   ~4
    6     9*       VERIFY_RETURN_TYPE                                       
         10*     > RETURN                                                   null

End of function from_little_uint16_t

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.67 ms | 1398 KiB | 20 Q