1<?php
2
3/** @generate-class-entries */
4
5class ReflectionException extends Exception
6{
7}
8
9class Reflection
10{
11    /** @tentative-return-type */
12    public static function getModifierNames(int $modifiers): array {}
13}
14
15interface Reflector extends Stringable
16{
17}
18
19/** @not-serializable */
20abstract class ReflectionFunctionAbstract implements Reflector
21{
22    public string $name;
23
24    /** @implementation-alias ReflectionClass::__clone */
25    private function __clone(): void {}
26
27    /** @tentative-return-type */
28    public function inNamespace(): bool {}
29
30    /** @tentative-return-type */
31    public function isClosure(): bool {}
32
33    /** @tentative-return-type */
34    public function isDeprecated(): bool {}
35
36    /** @tentative-return-type */
37    public function isInternal(): bool {}
38
39    /** @tentative-return-type */
40    public function isUserDefined(): bool {}
41
42    /** @tentative-return-type */
43    public function isGenerator(): bool {}
44
45    /** @tentative-return-type */
46    public function isVariadic(): bool {}
47
48    /** @tentative-return-type */
49    public function isStatic(): bool {}
50
51    /** @tentative-return-type */
52    public function getClosureThis(): ?object {}
53
54    /** @tentative-return-type */
55    public function getClosureScopeClass(): ?ReflectionClass {}
56
57    /** @tentative-return-type */
58    public function getClosureCalledClass(): ?ReflectionClass {}
59
60    public function getClosureUsedVariables(): array {}
61
62    /** @tentative-return-type */
63    public function getDocComment(): string|false {}
64
65    /** @tentative-return-type */
66    public function getEndLine(): int|false {}
67
68    /** @tentative-return-type */
69    public function getExtension(): ?ReflectionExtension {}
70
71    /** @tentative-return-type */
72    public function getExtensionName(): string|false {}
73
74    /** @tentative-return-type */
75    public function getFileName(): string|false {}
76
77    /** @tentative-return-type */
78    public function getName(): string {}
79
80    /** @tentative-return-type */
81    public function getNamespaceName(): string {}
82
83    /** @tentative-return-type */
84    public function getNumberOfParameters(): int {}
85
86    /** @tentative-return-type */
87    public function getNumberOfRequiredParameters(): int {}
88
89    /** @tentative-return-type */
90    public function getParameters(): array {}
91
92    /** @tentative-return-type */
93    public function getShortName(): string {}
94
95    /** @tentative-return-type */
96    public function getStartLine(): int|false {}
97
98    /** @tentative-return-type */
99    public function getStaticVariables(): array {}
100
101    /** @tentative-return-type */
102    public function returnsReference(): bool {}
103
104    /** @tentative-return-type */
105    public function hasReturnType(): bool {}
106
107    /** @tentative-return-type */
108    public function getReturnType(): ?ReflectionType {}
109
110    public function hasTentativeReturnType(): bool {}
111
112    public function getTentativeReturnType(): ?ReflectionType {}
113
114    public function getAttributes(?string $name = null, int $flags = 0): array {}
115}
116
117class ReflectionFunction extends ReflectionFunctionAbstract
118{
119    public function __construct(Closure|string $function) {}
120
121    public function __toString(): string {}
122
123    /**
124     * @tentative-return-type
125     * @deprecated ReflectionFunction can no longer be constructed for disabled functions
126     */
127    public function isDisabled(): bool {}
128
129    /** @tentative-return-type */
130    public function invoke(mixed ...$args): mixed {}
131
132    /** @tentative-return-type */
133    public function invokeArgs(array $args): mixed {}
134
135    /** @tentative-return-type */
136    public function getClosure(): Closure {}
137}
138
139/** @not-serializable */
140final class ReflectionGenerator
141{
142    public function __construct(Generator $generator) {}
143
144    /** @tentative-return-type */
145    public function getExecutingLine(): int {}
146
147    /** @tentative-return-type */
148    public function getExecutingFile(): string {}
149
150    /** @tentative-return-type */
151    public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array {}
152
153    /** @tentative-return-type */
154    public function getFunction(): ReflectionFunctionAbstract {}
155
156    /** @tentative-return-type */
157    public function getThis(): ?object {}
158
159    /** @tentative-return-type */
160    public function getExecutingGenerator(): Generator {}
161}
162
163class ReflectionMethod extends ReflectionFunctionAbstract
164{
165    public string $class;
166
167    public function __construct(object|string $objectOrMethod, ?string $method = null) {}
168
169    public function __toString(): string {}
170
171    /** @tentative-return-type */
172    public function isPublic(): bool {}
173
174    /** @tentative-return-type */
175    public function isPrivate(): bool {}
176
177    /** @tentative-return-type */
178    public function isProtected(): bool {}
179
180    /** @tentative-return-type */
181    public function isAbstract(): bool {}
182
183    /** @tentative-return-type */
184    public function isFinal(): bool {}
185
186    /** @tentative-return-type */
187    public function isConstructor(): bool {}
188
189    /** @tentative-return-type */
190    public function isDestructor(): bool {}
191
192    /** @tentative-return-type */
193    public function getClosure(?object $object = null): Closure {}
194
195    /** @tentative-return-type */
196    public function getModifiers(): int {}
197
198    /** @tentative-return-type */
199    public function invoke(?object $object, mixed ...$args): mixed {}
200
201    /** @tentative-return-type */
202    public function invokeArgs(?object $object, array $args): mixed {}
203
204    /** @tentative-return-type */
205    public function getDeclaringClass(): ReflectionClass {}
206
207    /** @tentative-return-type */
208    public function getPrototype(): ReflectionMethod {}
209
210    /** @tentative-return-type */
211    public function setAccessible(bool $accessible): void {}
212}
213
214/** @not-serializable */
215class ReflectionClass implements Reflector
216{
217    public string $name;
218
219    private function __clone(): void {}
220
221    public function __construct(object|string $objectOrClass) {}
222
223    public function __toString(): string {}
224
225    /** @tentative-return-type */
226    public function getName(): string {}
227
228    /** @tentative-return-type */
229    public function isInternal(): bool {}
230
231    /** @tentative-return-type */
232    public function isUserDefined(): bool {}
233
234    /** @tentative-return-type */
235    public function isAnonymous(): bool {}
236
237    /** @tentative-return-type */
238    public function isInstantiable(): bool {}
239
240    /** @tentative-return-type */
241    public function isCloneable(): bool {}
242
243    /** @tentative-return-type */
244    public function getFileName(): string|false {}
245
246    /** @tentative-return-type */
247    public function getStartLine(): int|false {}
248
249    /** @tentative-return-type */
250    public function getEndLine(): int|false {}
251
252    /** @tentative-return-type */
253    public function getDocComment(): string|false {}
254
255    /** @tentative-return-type */
256    public function getConstructor(): ?ReflectionMethod {}
257
258    /** @tentative-return-type */
259    public function hasMethod(string $name): bool {}
260
261    /** @tentative-return-type */
262    public function getMethod(string $name): ReflectionMethod {}
263
264    /** @tentative-return-type */
265    public function getMethods(?int $filter = null): array {}
266
267    /** @tentative-return-type */
268    public function hasProperty(string $name): bool {}
269
270    /** @tentative-return-type */
271    public function getProperty(string $name): ReflectionProperty {}
272
273    /** @tentative-return-type */
274    public function getProperties(?int $filter = null): array {}
275
276    /** @tentative-return-type */
277    public function hasConstant(string $name): bool {}
278
279    /** @tentative-return-type */
280    public function getConstants(?int $filter = null): array {}
281
282    /** @tentative-return-type */
283    public function getReflectionConstants(?int $filter = null): array {}
284
285    /** @tentative-return-type */
286    public function getConstant(string $name): mixed {}
287
288    /** @tentative-return-type */
289    public function getReflectionConstant(string $name): ReflectionClassConstant|false {}
290
291    /** @tentative-return-type */
292    public function getInterfaces(): array {}
293
294    /** @tentative-return-type */
295    public function getInterfaceNames(): array {}
296
297    /** @tentative-return-type */
298    public function isInterface(): bool {}
299
300    /** @tentative-return-type */
301    public function getTraits(): array {}
302
303    /** @tentative-return-type */
304    public function getTraitNames(): array {}
305
306    /** @tentative-return-type */
307    public function getTraitAliases(): array {}
308
309    /** @tentative-return-type */
310    public function isTrait(): bool {}
311
312    public function isEnum(): bool {}
313
314    /** @tentative-return-type */
315    public function isAbstract(): bool {}
316
317    /** @tentative-return-type */
318    public function isFinal(): bool {}
319
320    /** @tentative-return-type */
321    public function getModifiers(): int {}
322
323    /** @tentative-return-type */
324    public function isInstance(object $object): bool {}
325
326    /** @tentative-return-type */
327    public function newInstance(mixed ...$args): object {}
328
329    /** @tentative-return-type */
330    public function newInstanceWithoutConstructor(): object {}
331
332    /** @tentative-return-type */
333    public function newInstanceArgs(array $args = []): ?object {}
334
335    /** @tentative-return-type */
336    public function getParentClass(): ReflectionClass|false {}
337
338    /** @tentative-return-type */
339    public function isSubclassOf(ReflectionClass|string $class): bool {}
340
341    /** @tentative-return-type */
342    public function getStaticProperties(): ?array {}
343
344    /** @tentative-return-type */
345    public function getStaticPropertyValue(string $name, mixed $default = UNKNOWN): mixed {}
346
347    /** @tentative-return-type */
348    public function setStaticPropertyValue(string $name, mixed $value): void {}
349
350    /** @tentative-return-type */
351    public function getDefaultProperties(): array {}
352
353    /** @tentative-return-type */
354    public function isIterable(): bool {}
355
356    /**
357     * @tentative-return-type
358     * @alias ReflectionClass::isIterable
359     */
360    public function isIterateable(): bool {}
361
362    /** @tentative-return-type */
363    public function implementsInterface(ReflectionClass|string $interface): bool {}
364
365    /** @tentative-return-type */
366    public function getExtension(): ?ReflectionExtension {}
367
368    /** @tentative-return-type */
369    public function getExtensionName(): string|false {}
370
371    /** @tentative-return-type */
372    public function inNamespace(): bool {}
373
374    /** @tentative-return-type */
375    public function getNamespaceName(): string {}
376
377    /** @tentative-return-type */
378    public function getShortName(): string {}
379
380    public function getAttributes(?string $name = null, int $flags = 0): array {}
381}
382
383class ReflectionObject extends ReflectionClass
384{
385    public function __construct(object $object) {}
386}
387
388/** @not-serializable */
389class ReflectionProperty implements Reflector
390{
391    public string $name;
392    public string $class;
393
394    /** @implementation-alias ReflectionClass::__clone */
395    private function __clone(): void {}
396
397    public function __construct(object|string $class, string $property) {}
398
399    public function __toString(): string {}
400
401    /** @tentative-return-type */
402    public function getName(): string {}
403
404    /** @tentative-return-type */
405    public function getValue(?object $object = null): mixed {}
406
407    /** @tentative-return-type */
408    public function setValue(mixed $objectOrValue, mixed $value = UNKNOWN): void {}
409
410    /** @tentative-return-type */
411    public function isInitialized(?object $object = null): bool {}
412
413    /** @tentative-return-type */
414    public function isPublic(): bool {}
415
416    /** @tentative-return-type */
417    public function isPrivate(): bool {}
418
419    /** @tentative-return-type */
420    public function isProtected(): bool {}
421
422    /** @tentative-return-type */
423    public function isStatic(): bool {}
424
425    public function isReadOnly(): bool {}
426
427    /** @tentative-return-type */
428    public function isDefault(): bool {}
429
430    public function isPromoted(): bool {}
431
432    /** @tentative-return-type */
433    public function getModifiers(): int {}
434
435    /** @tentative-return-type */
436    public function getDeclaringClass(): ReflectionClass {}
437
438    /** @tentative-return-type */
439    public function getDocComment(): string|false {}
440
441    /** @tentative-return-type */
442    public function setAccessible(bool $accessible): void {}
443
444    /** @tentative-return-type */
445    public function getType(): ?ReflectionType {}
446
447    /** @tentative-return-type */
448    public function hasType(): bool {}
449
450    public function hasDefaultValue(): bool {}
451
452    /** @tentative-return-type */
453    public function getDefaultValue(): mixed {}
454
455    public function getAttributes(?string $name = null, int $flags = 0): array {}
456}
457
458/** @not-serializable */
459class ReflectionClassConstant implements Reflector
460{
461    public string $name;
462    public string $class;
463
464    /** @implementation-alias ReflectionClass::__clone */
465    private function __clone(): void {}
466
467    public function __construct(object|string $class, string $constant) {}
468
469    public function __toString(): string {}
470
471    /** @tentative-return-type */
472    public function getName(): string {}
473
474    /** @tentative-return-type */
475    public function getValue(): mixed {}
476
477    /** @tentative-return-type */
478    public function isPublic(): bool {}
479
480    /** @tentative-return-type */
481    public function isPrivate(): bool {}
482
483    /** @tentative-return-type */
484    public function isProtected(): bool {}
485
486    public function isFinal(): bool {}
487
488    /** @tentative-return-type */
489    public function getModifiers(): int {}
490
491    /** @tentative-return-type */
492    public function getDeclaringClass(): ReflectionClass {}
493
494    /** @tentative-return-type */
495    public function getDocComment(): string|false {}
496
497    public function getAttributes(?string $name = null, int $flags = 0): array {}
498
499    public function isEnumCase(): bool {}
500}
501
502/** @not-serializable */
503class ReflectionParameter implements Reflector
504{
505    public string $name;
506
507    /** @implementation-alias ReflectionClass::__clone */
508    private function __clone(): void {}
509
510    /** @param string|array|object $function */
511    public function __construct($function, int|string $param) {}
512
513    public function __toString(): string {}
514
515    /** @tentative-return-type */
516    public function getName(): string {}
517
518    /** @tentative-return-type */
519    public function isPassedByReference(): bool {}
520
521    /** @tentative-return-type */
522    public function canBePassedByValue(): bool {}
523
524    /** @tentative-return-type */
525    public function getDeclaringFunction(): ReflectionFunctionAbstract {}
526
527    /** @tentative-return-type */
528    public function getDeclaringClass(): ?ReflectionClass {}
529
530    /**
531     * @tentative-return-type
532     * @deprecated Use ReflectionParameter::getType() instead
533     */
534    public function getClass(): ?ReflectionClass {}
535
536    /** @tentative-return-type */
537    public function hasType(): bool {}
538
539    /** @tentative-return-type */
540    public function getType(): ?ReflectionType {}
541
542    /**
543     * @tentative-return-type
544     * @deprecated Use ReflectionParameter::getType() instead
545     */
546    public function isArray(): bool {}
547
548    /**
549     * @tentative-return-type
550     * @deprecated Use ReflectionParameter::getType() instead
551     */
552    public function isCallable(): bool {}
553
554    /** @tentative-return-type */
555    public function allowsNull(): bool {}
556
557    /** @tentative-return-type */
558    public function getPosition(): int {}
559
560    /** @tentative-return-type */
561    public function isOptional(): bool {}
562
563    /** @tentative-return-type */
564    public function isDefaultValueAvailable(): bool {}
565
566    /** @tentative-return-type */
567    public function getDefaultValue(): mixed {}
568
569    /** @tentative-return-type */
570    public function isDefaultValueConstant(): bool {}
571
572    /** @tentative-return-type */
573    public function getDefaultValueConstantName(): ?string {}
574
575    /** @tentative-return-type */
576    public function isVariadic(): bool {}
577
578    public function isPromoted(): bool {}
579
580    public function getAttributes(?string $name = null, int $flags = 0): array {}
581}
582
583/** @not-serializable */
584abstract class ReflectionType implements Stringable
585{
586    /** @implementation-alias ReflectionClass::__clone */
587    private function __clone(): void {}
588
589    /** @tentative-return-type */
590    public function allowsNull(): bool {}
591
592    public function __toString(): string {}
593}
594
595class ReflectionNamedType extends ReflectionType
596{
597    /** @tentative-return-type */
598    public function getName(): string {}
599
600    /** @tentative-return-type */
601    public function isBuiltin(): bool {}
602}
603
604class ReflectionUnionType extends ReflectionType
605{
606    public function getTypes(): array {}
607}
608
609class ReflectionIntersectionType extends ReflectionType
610{
611    public function getTypes(): array {}
612}
613
614/** @not-serializable */
615class ReflectionExtension implements Reflector
616{
617    public string $name;
618
619    /** @implementation-alias ReflectionClass::__clone */
620    private function __clone(): void {}
621
622    public function __construct(string $name) {}
623
624    public function __toString(): string {}
625
626    /** @tentative-return-type */
627    public function getName(): string {}
628
629    /** @tentative-return-type */
630    public function getVersion(): ?string {}
631
632    /** @tentative-return-type */
633    public function getFunctions(): array {}
634
635    /** @tentative-return-type */
636    public function getConstants(): array {}
637
638    /** @tentative-return-type */
639    public function getINIEntries(): array {}
640
641    /** @tentative-return-type */
642    public function getClasses(): array {}
643
644    /** @tentative-return-type */
645    public function getClassNames(): array {}
646
647    /** @tentative-return-type */
648    public function getDependencies(): array {}
649
650    /** @tentative-return-type */
651    public function info(): void {}
652
653    /** @tentative-return-type */
654    public function isPersistent(): bool {}
655
656    /** @tentative-return-type */
657    public function isTemporary(): bool {}
658}
659
660/** @not-serializable */
661class ReflectionZendExtension implements Reflector
662{
663    public string $name;
664
665    /** @implementation-alias ReflectionClass::__clone */
666    private function __clone(): void {}
667
668    public function __construct(string $name) {}
669
670    public function __toString(): string {}
671
672    /** @tentative-return-type */
673    public function getName(): string {}
674
675    /** @tentative-return-type */
676    public function getVersion(): string {}
677
678    /** @tentative-return-type */
679    public function getAuthor(): string {}
680
681    /** @tentative-return-type */
682    public function getURL(): string {}
683
684    /** @tentative-return-type */
685    public function getCopyright(): string {}
686}
687
688/** @not-serializable */
689final class ReflectionReference
690{
691    public static function fromArrayElement(array $array, int|string $key): ?ReflectionReference {}
692
693    public function getId(): string {}
694
695    /** @implementation-alias ReflectionClass::__clone */
696    private function __clone(): void {}
697
698    private function __construct() {}
699}
700
701/** @not-serializable */
702class ReflectionAttribute implements Reflector
703{
704    public function getName(): string {}
705    public function getTarget(): int {}
706    public function isRepeated(): bool {}
707    public function getArguments(): array {}
708    public function newInstance(): object {}
709
710    public function __toString(): string {}
711
712    private function __clone(): void {}
713
714    private function __construct() {}
715}
716
717class ReflectionEnum extends ReflectionClass
718{
719    public function __construct(object|string $objectOrClass) {}
720
721    public function hasCase(string $name): bool {}
722
723    public function getCase(string $name): ReflectionEnumUnitCase {}
724
725    public function getCases(): array {}
726
727    public function isBacked(): bool {}
728
729    public function getBackingType(): ?ReflectionType {}
730}
731
732class ReflectionEnumUnitCase extends ReflectionClassConstant
733{
734    public function __construct(object|string $class, string $constant) {}
735
736    public function getEnum(): ReflectionEnum {}
737
738    /**
739     * @implementation-alias ReflectionClassConstant::getValue
740     * @no-verify
741     */
742    public function getValue(): UnitEnum {}
743}
744
745class ReflectionEnumBackedCase extends ReflectionEnumUnitCase
746{
747    public function __construct(object|string $class, string $constant) {}
748
749    public function getBackingValue(): int|string {}
750}
751
752/** @not-serializable */
753final class ReflectionFiber
754{
755    public function __construct(Fiber $fiber) {}
756
757    public function getFiber(): Fiber {}
758
759    public function getExecutingFile(): ?string {}
760
761    public function getExecutingLine(): ?int {}
762
763    public function getCallable(): callable {}
764
765    public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array {}
766}
767