3v4l.org

run code in 300+ PHP versions simultaneously
<?php function percentage($price, $percentage) { return ($price/100) * $percentage; } echo percentage(299, 10, 2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q8FBV
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'percentage'
          1        SEND_VAL                                                 299
          2        SEND_VAL                                                 10
          3        SEND_VAL                                                 2
          4        DO_FCALL                                      0  $0      
          5        ECHO                                                     $0
          6      > RETURN                                                   1

Function percentage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q8FBV
function name:  percentage
number of ops:  6
compiled vars:  !0 = $price, !1 = $percentage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        DIV                                              ~2      !0, 100
          3        MUL                                              ~3      !1, ~2
          4      > RETURN                                                   ~3
    4     5*     > RETURN                                                   null

End of function percentage

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.27 ms | 1400 KiB | 15 Q