3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1($unset = false) { // PHP establishes an internal static var and binds // the local name 'bar' to it static $bar = 3; // unlink the name 'bar' from the internal static var unset($bar); // we can reuse $bar! $bar = " this is crazy "; echo $bar; // rebind 'bar' to the internal static var! static $bar; $bar++; echo $bar; } test1(); test1(); test1(); test1();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2GgV6
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'test1'
          1        DO_FCALL                                      0          
   25     2        INIT_FCALL                                               'test1'
          3        DO_FCALL                                      0          
   26     4        INIT_FCALL                                               'test1'
          5        DO_FCALL                                      0          
   27     6        INIT_FCALL                                               'test1'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function test1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.6 ms | 1395 KiB | 15 Q