3v4l.org

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

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

End of function staticsurprise

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.19 ms | 937 KiB | 15 Q