3v4l.org

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

Function ackermann:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A1jCO
function name:  ackermann
number of ops:  27
compiled vars:  !0 = $m, !1 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        IS_EQUAL                                                 !0, 0
          3      > JMPZ                                                     ~2, ->7
    6     4    >   ADD                                              ~3      !1, 1
          5      > RETURN                                                   ~3
          6*       JMP                                                      ->15
    8     7    >   IS_EQUAL                                                 !1, 0
          8      > JMPZ                                                     ~4, ->15
   10     9    >   INIT_FCALL_BY_NAME                                       'ackermann'
         10        SUB                                              ~5      !0, 1
         11        SEND_VAL_EX                                              ~5
         12        SEND_VAL_EX                                              1
         13        DO_FCALL                                      0  $6      
         14      > RETURN                                                   $6
   12    15    >   INIT_FCALL_BY_NAME                                       'ackermann'
         16        SUB                                              ~7      !0, 1
         17        SEND_VAL_EX                                              ~7
         18        INIT_FCALL_BY_NAME                                       'ackermann'
         19        SEND_VAR_EX                                              !0
         20        SUB                                              ~8      !1, 1
         21        SEND_VAL_EX                                              ~8
         22        DO_FCALL                                      0  $9      
         23        SEND_VAR_NO_REF_EX                                       $9
         24        DO_FCALL                                      0  $10     
         25      > RETURN                                                   $10
   13    26*     > RETURN                                                   null

End of function ackermann

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.51 ms | 1399 KiB | 14 Q