3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { static $count = 0; $count++; echo $count; if ($count < 10) { test(); } $count--; echo $count; } test(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EV7QZ
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'test'
          1        DO_FCALL                                      0          
   15     2      > RETURN                                                   1

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.16 ms | 1397 KiB | 14 Q