3v4l.org

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

Function staticsurprise:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MR0iL
function name:  staticSurprise
number of ops:  5
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_STATIC                                              !0
    5     1        ECHO                                                     !0
    7     2      > RETURN                                                   null
    9     3*       ASSIGN                                                   !0, 'After'
   10     4*     > RETURN                                                   null

End of function staticsurprise

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.47 ms | 1388 KiB | 14 Q