<?php
class ClassThatKeepsExceptionReference
{
public function __construct()
{
$this->exeption_reference = new Exception();
}
public function throw_ref()
{
throw $this->exception_reference;
}
}
(new ClassThatKeepsExceptionReference)->throw_ref();
Deprecated: Creation of dynamic property ClassThatKeepsExceptionReference::$exeption_reference is deprecated in /in/SQMpk on line 7
Warning: Undefined property: ClassThatKeepsExceptionReference::$exception_reference in /in/SQMpk on line 12
Fatal error: Uncaught Error: Can only throw objects in /in/SQMpk:12
Stack trace:
#0 /in/SQMpk(16): ClassThatKeepsExceptionReference->throw_ref()
#1 {main}
thrown in /in/SQMpk on line 12
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
Warning: Undefined property: ClassThatKeepsExceptionReference::$exception_reference in /in/SQMpk on line 12
Fatal error: Uncaught Error: Can only throw objects in /in/SQMpk:12
Stack trace:
#0 /in/SQMpk(16): ClassThatKeepsExceptionReference->throw_ref()
#1 {main}
thrown in /in/SQMpk on line 12
Process exited with code 255.
Notice: Undefined property: ClassThatKeepsExceptionReference::$exception_reference in /in/SQMpk on line 12
Fatal error: Uncaught Error: Can only throw objects in /in/SQMpk:12
Stack trace:
#0 /in/SQMpk(16): ClassThatKeepsExceptionReference->throw_ref()
#1 {main}
thrown in /in/SQMpk on line 12
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Fatal error: Uncaught Error: Can only throw objects in /in/SQMpk:12
Stack trace:
#0 /in/SQMpk(16): ClassThatKeepsExceptionReference->throw_ref()
#1 {main}
thrown in /in/SQMpk on line 12
Process exited with code 255.
Notice: Undefined property: ClassThatKeepsExceptionReference::$exception_reference in /in/SQMpk on line 12
Fatal error: Can only throw objects in /in/SQMpk on line 12
Process exited with code 255.
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/SQMpk on line 16
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/SQMpk on line 16
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/SQMpk on line 5
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/SQMpk on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/SQMpk on line 5
Process exited with code 255.