3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1($unset = false) { static $bar = 5; $bar++; echo $bar . " "; unset($bar); /* $bar = " | "; echo $bar; static $bar = 10; $bar++; echo $bar . " "; //*/ } function test2($unset = false) { static $bar = 5; $bar++; echo $bar . " "; unset($bar); $bar = " | "; echo $bar; static $bar = 10; $bar++; echo $bar . " "; } test1(); test1(); test1(); test1(); test2(); test2(); test2(); test2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7PeOe
function name:  (null)
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   INIT_FCALL                                               'test1'
          1        DO_FCALL                                      0          
   41     2        INIT_FCALL                                               'test1'
          3        DO_FCALL                                      0          
   42     4        INIT_FCALL                                               'test1'
          5        DO_FCALL                                      0          
   43     6        INIT_FCALL                                               'test1'
          7        DO_FCALL                                      0          
   45     8        INIT_FCALL                                               'test2'
          9        DO_FCALL                                      0          
   46    10        INIT_FCALL                                               'test2'
         11        DO_FCALL                                      0          
   47    12        INIT_FCALL                                               'test2'
         13        DO_FCALL                                      0          
   48    14        INIT_FCALL                                               'test2'
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7PeOe
function name:  test1
number of ops:  7
compiled vars:  !0 = $unset, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <false>
    4     1        BIND_STATIC                                              !1
    5     2        PRE_INC                                                  !1
    6     3        CONCAT                                           ~3      !1, '+'
          4        ECHO                                                     ~3
    9     5        UNSET_CV                                                 !1
   20     6      > RETURN                                                   null

End of function test1

Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7PeOe
function name:  test2
number of ops:  13
compiled vars:  !0 = $unset, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV_INIT                                        !0      <false>
   23     1        BIND_STATIC                                              !1
   24     2        PRE_INC                                                  !1
   25     3        CONCAT                                           ~3      !1, '+'
          4        ECHO                                                     ~3
   28     5        UNSET_CV                                                 !1
   31     6        ASSIGN                                                   !1, '+%7C+'
   32     7        ECHO                                                     !1
   34     8        BIND_STATIC                                              !1
   35     9        PRE_INC                                                  !1
   36    10        CONCAT                                           ~6      !1, '+'
         11        ECHO                                                     ~6
   37    12      > RETURN                                                   null

End of function test2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.52 ms | 1400 KiB | 17 Q