3v4l.org

run code in 300+ PHP versions simultaneously
<?php $src = '000080c0'; $arr = array_map('hexdec', str_split($src, 2)); $float = unpack('f', pack("C*", ...$arr)); var_dump($float); // float(-4)
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nZSNi
function name:  (null)
number of ops:  24
compiled vars:  !0 = $src, !1 = $arr, !2 = $float
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '000080c0'
    5     1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 'hexdec'
          3        INIT_FCALL                                               'str_split'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 2
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    6    10        INIT_FCALL                                               'unpack'
         11        SEND_VAL                                                 'f'
         12        INIT_FCALL                                               'pack'
         13        SEND_VAL                                                 'C%2A'
         14        SEND_UNPACK                                              !1
         15        CHECK_UNDEF_ARGS                                         
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                         $8      
         19        ASSIGN                                                   !2, $8
    7    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.07 ms | 1009 KiB | 18 Q