3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $var; public function __construct() { $this->var = '123'; } } class Bar extends Foo { public static function destroyVar(&$var) { unset($var); } } $foo = new Foo(); Bar::destroyVar($foo->var); var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uO1u4
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_STATIC_METHOD_CALL                                  'Bar', 'destroyVar'
          4        FETCH_OBJ_W                                      $4      !0, 'var'
          5        SEND_REF                                                 $4
          6        DO_FCALL                                      0          
   21     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uO1u4
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               'var'
          1        OP_DATA                                                  '123'
   10     2      > RETURN                                                   null

End of function __construct

End of class Foo.

Class Bar:
Function destroyvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uO1u4
function name:  destroyVar
number of ops:  3
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        UNSET_CV                                                 !0
   16     2      > RETURN                                                   null

End of function destroyvar

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uO1u4
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               'var'
          1        OP_DATA                                                  '123'
   10     2      > RETURN                                                   null

End of function __construct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.55 ms | 1388 KiB | 15 Q