3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getFloatFromInteger($integer) { $hex = dechex($integer); $pack = pack('H*', $hex); $pack = strrev($pack); $result = unpack('d*', $pack); return $result[1]; } $test = getFloatFromInteger(4619191942746344941); echo $test;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F1tV5
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'getfloatfrominteger'
          1        SEND_VAL                                                 4619191942746344941
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   14     4        ECHO                                                     !0
          5      > RETURN                                                   1

Function getfloatfrominteger:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F1tV5
function name:  getFloatFromInteger
number of ops:  22
compiled vars:  !0 = $integer, !1 = $hex, !2 = $pack, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'dechex'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        INIT_FCALL                                               'pack'
          6        SEND_VAL                                                 'H%2A'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !2, $6
    7    10        INIT_FCALL                                               'strrev'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !2, $8
    8    14        INIT_FCALL                                               'unpack'
         15        SEND_VAL                                                 'd%2A'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !3, $10
    9    19        FETCH_DIM_R                                      ~12     !3, 1
         20      > RETURN                                                   ~12
   10    21*     > RETURN                                                   null

End of function getfloatfrominteger

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.82 ms | 1399 KiB | 22 Q