php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_exceptions.stub.php
Go to the documentation of this file.
1<?php
2
4
5require "zend_constants.stub.php";
6
7interface Throwable extends Stringable
8{
9 public function getMessage(): string;
10
12 public function getCode(); // TODO add proper type (i.e. int|string)
13
14 public function getFile(): string;
15
16 public function getLine(): int;
17
18 public function getTrace(): array;
19
20 public function getPrevious(): ?Throwable;
21
22 public function getTraceAsString(): string;
23}
24
25class Exception implements Throwable
26{
31 protected $message = "";
32 private string $string = "";
37 protected $code = 0; // TODO add proper type (i.e. int|string)
38 protected string $file = "";
39 protected int $line = 0;
40 private array $trace = [];
41 private ?Throwable $previous = null;
42
43 private function __clone(): void {}
44
45 public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {}
46
48 public function __wakeup(): void {}
49
50 final public function getMessage(): string {}
51
53 final public function getCode() {} // TODO add proper type (i.e. int|string)
54
55 final public function getFile(): string {}
56
57 final public function getLine(): int {}
58
59 final public function getTrace(): array {}
60
61 final public function getPrevious(): ?Throwable {}
62
63 final public function getTraceAsString(): string {}
64
65 public function __toString(): string {}
66}
67
69{
70 protected int $severity = E_ERROR;
71
72 public function __construct(
73 string $message = "",
74 int $code = 0,
75 int $severity = E_ERROR,
76 ?string $filename = null,
77 ?int $line = null,
78 ?Throwable $previous = null
79 ) {}
80
81 final public function getSeverity(): int {}
82}
83
84class Error implements Throwable
85{
90 protected $message = "";
91 private string $string = "";
96 protected $code = 0; // TODO add proper type (i.e. int|string)
97 protected string $file = "";
98 protected int $line;
99 private array $trace = [];
100 private ?Throwable $previous = null;
101
103 private function __clone(): void {}
104
106 public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) {}
107
112 public function __wakeup(): void {}
113
115 final public function getMessage(): string {}
116
121 final public function getCode() {}
122
124 final public function getFile(): string {}
125
127 final public function getLine(): int {}
128
130 final public function getTrace(): array {}
131
133 final public function getPrevious(): ?Throwable {}
134
136 final public function getTraceAsString(): string {}
137
139 public function __toString(): string {}
140}
141
142class CompileError extends Error
143{
144}
145
147{
148}
149
150class TypeError extends Error
151{
152}
153
155{
156}
157
158class ValueError extends Error
159{
160}
161
163{
164}
165
167{
168}
169
171{
172}
173
175{
176}
__construct(string $message="", int $code=0, int $severity=E_ERROR, ?string $filename=null, ?int $line=null, ?Throwable $previous=null)
__construct(string $message="", int $code=0, ?Throwable $previous=null)
__construct(string $message="", int $code=0, ?Throwable $previous=null)
$filename
Definition create.php:9
getTraceAsString()
#define E_ERROR
Definition zend_errors.h:23
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
function(EX_VAR(opline->result.var))