3v4l.org

run code in 300+ PHP versions simultaneously
<?php $u = 1; function f() { global $u; unset($u); $u = 2; } function f2() { global $u; var_dump($u); } f(); f2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/35Yaq
function name:  (null)
number of ops:  6
compiled vars:  !0 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
   15     1        INIT_FCALL                                               'f'
          2        DO_FCALL                                      0          
   16     3        INIT_FCALL                                               'f2'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/35Yaq
function name:  f
number of ops:  4
compiled vars:  !0 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_GLOBAL                                              !0, 'u'
    7     1        UNSET_CV                                                 !0
    8     2        ASSIGN                                                   !0, 2
    9     3      > RETURN                                                   null

End of function f

Function f2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/35Yaq
function name:  f2
number of ops:  5
compiled vars:  !0 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   BIND_GLOBAL                                              !0, 'u'
   13     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   14     4      > RETURN                                                   null

End of function f2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.82 ms | 1397 KiB | 17 Q