xref: /PHP-8.1/ext/spl/spl_fixedarray.stub.php (revision 6d805ed2)
1<?php
2
3/** @generate-class-entries */
4
5class SplFixedArray implements IteratorAggregate, ArrayAccess, Countable, JsonSerializable
6{
7    public function __construct(int $size = 0) {}
8
9    /** @tentative-return-type */
10    public function __wakeup(): void {}
11
12    /** @tentative-return-type */
13    public function count(): int {}
14
15    /** @tentative-return-type */
16    public function toArray(): array {}
17
18    /** @tentative-return-type */
19    public static function fromArray(array $array, bool $preserveKeys = true): SplFixedArray {}
20
21    /** @tentative-return-type */
22    public function getSize(): int {}
23
24    /** @return bool */
25    public function setSize(int $size) {} // TODO make return type void
26
27    /**
28     * @param int $index
29     * @tentative-return-type
30     */
31    public function offsetExists($index): bool {}
32
33    /**
34     * @param int $index
35     * @tentative-return-type
36     */
37    public function offsetGet($index): mixed {}
38
39    /**
40     * @param int $index
41     * @tentative-return-type
42     */
43    public function offsetSet($index, mixed $value): void {}
44
45    /**
46     * @param int $index
47     * @tentative-return-type
48     */
49    public function offsetUnset($index): void {}
50
51    public function getIterator(): Iterator {}
52
53    public function jsonSerialize(): array {}
54}
55