3v4l.org

run code in 300+ PHP versions simultaneously
<?php class rec { public function test($i = 0, $r = 0) { $i += 2; $r += 1; if($i > 20) { echo "$i . Runden: $r"; } else { $this->test($i, $r); } } } $rec = new rec; $rec->test(1, 1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vnpme
function name:  (null)
number of ops:  8
compiled vars:  !0 = $rec
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'rec'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'test'
          4        SEND_VAL_EX                                              1
          5        SEND_VAL_EX                                              1
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class rec:
Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vnpme
function name:  test
number of ops:  16
compiled vars:  !0 = $i, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      0
          1        RECV_INIT                                        !1      0
    6     2        ASSIGN_OP                                     1          !0, 2
    7     3        ASSIGN_OP                                     1          !1, 1
    9     4        IS_SMALLER                                               20, !0
          5      > JMPZ                                                     ~4, ->11
   10     6    >   ROPE_INIT                                     3  ~6      !0
          7        ROPE_ADD                                      1  ~6      ~6, '+.+Runden%3A+'
          8        ROPE_END                                      2  ~5      ~6, !1
          9        ECHO                                                     ~5
         10      > JMP                                                      ->15
   12    11    >   INIT_METHOD_CALL                                         'test'
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
   14    15    > > RETURN                                                   null

End of function test

End of class rec.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.97 ms | 1394 KiB | 13 Q