3v4l.org

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

Function mytest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RalkZ
function name:  myTest
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   BIND_STATIC                                              !0
    4     1        CAST                                          6  ~1      !0
          2        ECHO                                                     ~1
    5     3        PRE_INC                                                  !0
    6     4      > RETURN                                                   null

End of function mytest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.07 ms | 1402 KiB | 16 Q