3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { static $a = 1; $a++; print $a."\n"; } foo(); foo(); foo(); foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PksKo
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
   11     2        INIT_FCALL                                               'foo'
          3        DO_FCALL                                      0          
   12     4        INIT_FCALL                                               'foo'
          5        DO_FCALL                                      0          
   13     6        INIT_FCALL                                               'foo'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PksKo
function name:  foo
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_STATIC                                              !0
    6     1        PRE_INC                                                  !0
    7     2        CONCAT                                           ~2      !0, '%0A'
          3        ECHO                                                     ~2
    8     4      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.88 ms | 1397 KiB | 17 Q