3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stat_func($name) { static $q; if ($q === null) { $q = $name; } return $q; } echo stat_func('franz'); echo stat_func('joseph');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7jpXX
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'stat_func'
          1        SEND_VAL                                                 'franz'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   15     4        INIT_FCALL                                               'stat_func'
          5        SEND_VAL                                                 'joseph'
          6        DO_FCALL                                      0  $1      
          7        ECHO                                                     $1
          8      > RETURN                                                   1

Function stat_func:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/7jpXX
function name:  stat_func
number of ops:  7
compiled vars:  !0 = $name, !1 = $q
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        BIND_STATIC                                              !1
    6     2        TYPE_CHECK                                    2          !1
          3      > JMPZ                                                     ~2, ->5
    7     4    >   ASSIGN                                                   !1, !0
   10     5    > > RETURN                                                   !1
   11     6*     > RETURN                                                   null

End of function stat_func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.38 ms | 1397 KiB | 15 Q