3v4l.org

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

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7MT9M
function name:  test
number of ops:  14
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        MOD                                              ~2      !0, !1
          3        IS_SMALLER                                               0, ~2
          4      > JMPZ                                                     ~3, ->11
    5     5    >   INIT_FCALL_BY_NAME                                       'test'
          6        SEND_VAR_EX                                              !0
          7        SUB                                              ~4      !1, 1
          8        SEND_VAL_EX                                              ~4
          9        DO_FCALL                                      0          
         10      > JMP                                                      ->13
    8    11    >   MOD                                              ~6      !0, !1
         12        ECHO                                                     ~6
   10    13    > > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.57 ms | 1397 KiB | 14 Q