3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; public function __destruct() { throw new Exception('You shit'); } } class Bar { private $foo; public function __construct(Foo $foo) { $this->foo = $foo; $foo->bar = $this; } public function __destruct() { echo "Foo\n"; } } (new Bar(new Foo));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YUZmv
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $0      'Bar'
          1        NEW                                              $1      'Foo'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $1
          4        DO_FCALL                                      0          
          5        FREE                                                     $0
          6      > RETURN                                                   1

Class Foo:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/YUZmv
function name:  __destruct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'You+shit'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
   10     4*     > RETURN                                                   null

End of function __destruct

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/YUZmv
function name:  __construct
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        ASSIGN_OBJ                                               'foo'
          2        OP_DATA                                                  !0
   20     3        FETCH_THIS                                       ~3      
          4        ASSIGN_OBJ                                               !0, 'bar'
          5        OP_DATA                                                  ~3
   21     6      > 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/YUZmv
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   ECHO                                                     'Foo%0A'
   26     1      > RETURN                                                   null

End of function __destruct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.43 ms | 1395 KiB | 13 Q