3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { static $bar; $bar++; echo "Before unset: $bar, "; // $bar = 23; echo "after unset: $bar\n"; unset($bar); } foo(); foo(); foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jv2N3
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
   15     2        INIT_FCALL                                               'foo'
          3        DO_FCALL                                      0          
   16     4        INIT_FCALL                                               'foo'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jv2N3
function name:  foo
number of ops:  13
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_STATIC                                              !0
    5     1        PRE_INC                                                  !0
    6     2        ROPE_INIT                                     3  ~3      'Before+unset%3A+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, '%2C+'
          5        ECHO                                                     ~2
    8     6        ASSIGN                                                   !0, 23
   10     7        ROPE_INIT                                     3  ~7      'after+unset%3A+'
          8        ROPE_ADD                                      1  ~7      ~7, !0
          9        ROPE_END                                      2  ~6      ~7, '%0A'
         10        ECHO                                                     ~6
   11    11        UNSET_CV                                                 !0
   12    12      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.19 ms | 1397 KiB | 16 Q