3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [66, 233, 204, 205]; $res = array_reduce( $arr, function($c,$i) { $c.=dechex( $i ); return $c; }); $temp = "0x" . $res; $int = filter_var( $temp, FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ); if (false === $int) { throw new Exception("Invalid integer!"); } $arr = (unpack('f', pack('i', $int ))); $f = array_pop($arr); printf("%.3f",$f);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A02Hu
function name:  (null)
number of ops:  39
compiled vars:  !0 = $arr, !1 = $res, !2 = $temp, !3 = $int, !4 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_reduce'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
    8     4        SEND_VAL                                                 ~6
    5     5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !1, $7
    9     7        CONCAT                                           ~9      '0x', !1
          8        ASSIGN                                                   !2, ~9
   10     9        INIT_FCALL                                               'filter_var'
         10        SEND_VAR                                                 !2
         11        SEND_VAL                                                 257
         12        SEND_VAL                                                 2
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !3, $11
   11    15        TYPE_CHECK                                    4          !3
         16      > JMPZ                                                     ~13, ->21
   12    17    >   NEW                                              $14     'Exception'
         18        SEND_VAL_EX                                              'Invalid+integer%21'
         19        DO_FCALL                                      0          
         20      > THROW                                         0          $14
   16    21    >   INIT_FCALL                                               'unpack'
         22        SEND_VAL                                                 'f'
         23        INIT_FCALL                                               'pack'
         24        SEND_VAL                                                 'i'
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                         $16     
         27        SEND_VAR                                                 $16
         28        DO_ICALL                                         $17     
         29        ASSIGN                                                   !0, $17
   17    30        INIT_FCALL                                               'array_pop'
         31        SEND_REF                                                 !0
         32        DO_ICALL                                         $19     
         33        ASSIGN                                                   !4, $19
   18    34        INIT_FCALL                                               'printf'
         35        SEND_VAL                                                 '%25.3f'
         36        SEND_VAR                                                 !4
         37        DO_ICALL                                                 
         38      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A02Hu
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $c, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'dechex'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $2      
          5        ASSIGN_OP                                     8          !0, $2
    7     6      > RETURN                                                   !0
    8     7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.26 ms | 1013 KiB | 20 Q