3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function myTest() { static $x=0; echo $x; $x++; } myTest(); echo "<br>"; myTest(); echo "<br>"; myTest(); echo "<br>"; myTest(); echo "<br>"; myTest(); ?>
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/3uHWU
function name:  (null)
number of ops:  16
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
   8     1        INIT_FCALL                                               'mytest'
         2        DO_FCALL                                      0          
   9     3        ECHO                                                     '%3Cbr%3E'
  10     4        INIT_FCALL                                               'mytest'
         5        DO_FCALL                                      0          
  11     6        ECHO                                                     '%3Cbr%3E'
  12     7        INIT_FCALL                                               'mytest'
         8        DO_FCALL                                      0          
  13     9        ECHO                                                     '%3Cbr%3E'
  14    10        INIT_FCALL                                               'mytest'
        11        DO_FCALL                                      0          
  15    12        ECHO                                                     '%3Cbr%3E'
  16    13        INIT_FCALL                                               'mytest'
        14        DO_FCALL                                      0          
        15      > RETURN                                                   1

Function mytest:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/3uHWU
function name:  myTest
number of ops:  6
compiled vars:  !0 = $x
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   FETCH_W                      static              $1      'x'
         1        ASSIGN_REF                                               !0, $1
   4     2        ECHO                                                     !0
   5     3        POST_INC                                         ~2      !0
         4        FREE                                                     ~2
   6     5      > RETURN                                                   null

End of function mytest

Generated using Vulcan Logic Dumper, using php 7.3.0