3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar; function __construct($bar) { $this->bar = $bar; } function __destruct() { echo __METHOD__,"\n"; unset($this->bar); } } class Bar { function __destruct() { echo __METHOD__,"\n"; unset($this->bar); } } class Baz { function __destruct() { echo __METHOD__,"\n"; unset($this->bar); } } $e = 1; $f = 0; $y = new Bar(); $z = new Baz(); echo 'a'; $u = $e / $f; echo 'b'; $x = new Foo($y); echo 'c'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGCdq
function name:  (null)
number of ops:  18
compiled vars:  !0 = $e, !1 = $f, !2 = $y, !3 = $z, !4 = $u, !5 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   ASSIGN                                                   !0, 1
   28     1        ASSIGN                                                   !1, 0
   29     2        NEW                                              $8      'Bar'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $8
   30     5        NEW                                              $11     'Baz'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !3, $11
   31     8        ECHO                                                     'a'
   32     9        DIV                                              ~14     !0, !1
         10        ASSIGN                                                   !4, ~14
   33    11        ECHO                                                     'b'
   34    12        NEW                                              $16     'Foo'
         13        SEND_VAR_EX                                              !2
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !5, $16
   35    16        ECHO                                                     'c'
   36    17      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGCdq
function name:  __construct
number of ops:  4
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN_OBJ                                               'bar'
          2        OP_DATA                                                  !0
    6     3      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGCdq
function name:  __destruct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'Foo%3A%3A__destruct'
          1        ECHO                                                     '%0A'
    9     2        UNSET_OBJ                                                'bar'
   10     3      > RETURN                                                   null

End of function __destruct

End of class Foo.

Class Bar:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGCdq
function name:  __destruct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'Bar%3A%3A__destruct'
          1        ECHO                                                     '%0A'
   16     2        UNSET_OBJ                                                'bar'
   17     3      > RETURN                                                   null

End of function __destruct

End of class Bar.

Class Baz:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGCdq
function name:  __destruct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ECHO                                                     'Baz%3A%3A__destruct'
          1        ECHO                                                     '%0A'
   23     2        UNSET_OBJ                                                'bar'
   24     3      > RETURN                                                   null

End of function __destruct

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.42 ms | 1399 KiB | 13 Q