3v4l.org

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

Function foo:
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/5arYc
function name:  foo
number of ops:  6
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
    6     2        ECHO                                                     !1
    8     3      > JMPZ                                                     !0, ->5
    9     4    >   UNSET_CV                                                 !1
   11     5    > > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.25 ms | 1397 KiB | 16 Q