3v4l.org

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

Function calculate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zaeu9
function name:  calculate
number of ops:  11
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        DIV                                              ~1      1, !0
          2        INIT_FCALL_BY_NAME                                       'calculate'
          3        SUB                                              ~2      !0, 1
          4        SEND_VAL_EX                                              ~2
          5        DO_FCALL                                      0  $3      
          6        ADD                                              ~4      ~1, $3
          7      > RETURN                                                   ~4
    6     8*       IS_SMALLER                                               0, !0
          9*       JMPNZ                                                    ~5, ->1
    7    10*     > RETURN                                                   null

End of function calculate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.73 ms | 1397 KiB | 14 Q