3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassThatKeepsExceptionReference { protected $exception_reference; public function __construct() { $this->exeption_reference = new Exception(); } public function throw_ref() { throw $this->exception_reference; } } (new ClassThatKeepsExceptionReference)->throw_ref();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a6d5s
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $0      'ClassThatKeepsExceptionReference'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'throw_ref'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

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

End of function __construct

Function throw_ref:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/a6d5s
function name:  throw_ref
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'exception_reference'
          1      > THROW                                         0          ~0
   15     2*     > RETURN                                                   null

End of function throw_ref

End of class ClassThatKeepsExceptionReference.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.31 ms | 1394 KiB | 13 Q