3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function deleteMe(&$obj) { var_dump($GLOBALS); unset($obj); } } class Bar extends Foo { public function __construct() { $foo = new Foo(); var_dump($foo); Foo::deleteMe($foo); var_dump($foo); } } $bar = new Bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWcFA
function name:  (null)
number of ops:  4
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class Foo:
Function deleteme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWcFA
function name:  deleteMe
number of ops:  7
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'var_dump'
          2        FETCH_R                      global              ~1      'GLOBALS'
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    9     5        UNSET_CV                                                 !0
   10     6      > RETURN                                                   null

End of function deleteme

End of class Foo.

Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWcFA
function name:  __construct
number of ops:  13
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   19     6        INIT_STATIC_METHOD_CALL                                  'Foo', 'deleteMe'
          7        SEND_REF                                                 !0
          8        DO_FCALL                                      0          
   20     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   21    12      > RETURN                                                   null

End of function __construct

Function deleteme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWcFA
function name:  deleteMe
number of ops:  7
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'var_dump'
          2        FETCH_R                      global              ~1      'GLOBALS'
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    9     5        UNSET_CV                                                 !0
   10     6      > RETURN                                                   null

End of function deleteme

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.89 ms | 1400 KiB | 15 Q