3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo Math(90); function Math($x) { if ($x == 1) { return 2; } else { return (2 * $x) + math($x-1); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cq52s
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'Math'
          1        SEND_VAL_EX                                              90
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   12     4      > RETURN                                                   1

Function math:
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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cq52s
function name:  Math
number of ops:  13
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_EQUAL                                                 !0, 1
          2      > JMPZ                                                     ~1, ->5
    6     3    > > RETURN                                                   2
          4*       JMP                                                      ->12
   10     5    >   MUL                                              ~2      !0, 2
          6        INIT_FCALL_BY_NAME                                       'math'
          7        SUB                                              ~3      !0, 1
          8        SEND_VAL_EX                                              ~3
          9        DO_FCALL                                      0  $4      
         10        ADD                                              ~5      ~2, $4
         11      > RETURN                                                   ~5
   12    12*     > RETURN                                                   null

End of function math

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.9 ms | 1393 KiB | 13 Q