3v4l.org

run code in 300+ PHP versions simultaneously
<?php function horrible_excel_op($f, $g) { $tiers = [ [19.5, 2500], [18.5, 1875], [17.5, 1675], [16.5, 1550], [15.5, 1250], [14.5, 1125], [13.5, 925], [12.5, 800], [11.5, 725], [10.5, 650], [9.5, 575], [8.5, 475], [7.5, 375], [6.5, 325], [5.5, 250], [4.5, 225], [3.5, 150], [2.5, 100], [1.5, 75], ]; $defaultMultiplier = 50; foreach ($tiers as [$threshold, $multiplier]) { if ($f > $threshold) { return $g * $multiplier; } } return $g * $defaultMultiplier; } var_dump(horrible_excel_op(2.6374, 18));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C4iSp
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'horrible_excel_op'
          2        SEND_VAL                                                 2.6374
          3        SEND_VAL                                                 18
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function horrible_excel_op:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 17
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 17
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/C4iSp
function name:  horrible_excel_op
number of ops:  21
compiled vars:  !0 = $f, !1 = $g, !2 = $tiers, !3 = $defaultMultiplier, !4 = $threshold, !5 = $multiplier
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN                                                   !2, <array>
   26     3        ASSIGN                                                   !3, 50
   28     4      > FE_RESET_R                                       $8      !2, ->17
          5    > > FE_FETCH_R                                               $8, $9, ->17
          6    >   FETCH_LIST_R                                     $10     $9, 0
          7        ASSIGN                                                   !4, $10
          8        FETCH_LIST_R                                     $12     $9, 1
          9        ASSIGN                                                   !5, $12
         10        FREE                                                     $9
   29    11        IS_SMALLER                                               !4, !0
         12      > JMPZ                                                     ~14, ->16
   30    13    >   MUL                                              ~15     !1, !5
         14        FE_FREE                                                  $8
         15      > RETURN                                                   ~15
   28    16    > > JMP                                                      ->5
         17    >   FE_FREE                                                  $8
   34    18        MUL                                              ~16     !1, !3
         19      > RETURN                                                   ~16
   35    20*     > RETURN                                                   null

End of function horrible_excel_op

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.69 ms | 1403 KiB | 16 Q