3v4l.org

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

Function ack:
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/9ZQgj
function name:  ack
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      
    3     2        BOOL_NOT                                         ~2      !0
          3      > JMPZ                                                     ~2, ->7
          4    >   PRE_INC                                          ~3      !1
          5      > RETURN                                                   ~3
          6*       JMP                                                      ->15
    4     7    >   BOOL_NOT                                         ~4      !1
          8      > JMPZ                                                     ~4, ->15
    5     9    >   INIT_FCALL_BY_NAME                                       'ack'
         10        SUB                                              ~5      !0, 1
         11        SEND_VAL_EX                                              ~5
         12        SEND_VAL_EX                                              1
         13        DO_FCALL                                      0  $6      
         14      > RETURN                                                   $6
    6    15    >   INIT_FCALL_BY_NAME                                       'ack'
         16        SUB                                              ~7      !0, 1
         17        SEND_VAL_EX                                              ~7
         18        INIT_FCALL_BY_NAME                                       'ack'
         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
    7    26*     > RETURN                                                   null

End of function ack

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.36 ms | 1390 KiB | 14 Q