3v4l.org

run code in 500+ PHP versions simultaneously
<?php function shipmentfee($order, $vip){ if ($vip){ return 30; } elseif($order > 1000){ return 0; } elseif ($order > 500){ return 50; } else { return 80; } } shipmentfee(750, true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fcj9S
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                                   'shipmentfee'
          1        SEND_VAL                                                     750
          2        SEND_VAL                                                     <true>
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

Function shipmentfee:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fcj9S
function name:  shipmentfee
number of ops:  15
compiled vars:  !0 = $order, !1 = $vip
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    3     2      > JMPZ                                                         !1, ->5
    4     3    > > RETURN                                                       30
    3     4*       JMP                                                          ->14
    5     5    >   IS_SMALLER                                                   1000, !0
          6      > JMPZ                                                         ~2, ->9
    6     7    > > RETURN                                                       0
    5     8*       JMP                                                          ->14
    7     9    >   IS_SMALLER                                                   500, !0
         10      > JMPZ                                                         ~3, ->13
    8    11    > > RETURN                                                       50
    7    12*       JMP                                                          ->14
   10    13    > > RETURN                                                       80
   12    14*     > RETURN                                                       null

End of function shipmentfee

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.84 ms | 1385 KiB | 14 Q