3v4l.org

run code in 300+ PHP versions simultaneously
<?php function counter($start, &$stop){ if ($stop > $start){ return; } $start=$start - 1; ++$stop; counter($start, $stop); } $start = 5; $stop = 2; counter($start, $stop);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ahR85
function name:  (null)
number of ops:  7
compiled vars:  !0 = $start, !1 = $stop
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 5
   13     1        ASSIGN                                                   !1, 2
   14     2        INIT_FCALL                                               'counter'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function counter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.73 ms | 1398 KiB | 14 Q