xref: /php-src/Zend/zend_weakrefs.stub.php (revision 570d9b63)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @strict-properties
7 * @not-serializable
8 */
9final class WeakReference
10{
11    public function __construct() {}
12
13    public static function create(object $object): WeakReference {}
14
15    public function get(): ?object {}
16}
17
18/**
19 * @strict-properties
20 * @not-serializable
21 */
22final class WeakMap implements ArrayAccess, Countable, IteratorAggregate
23{
24    /** @param object $object */
25    public function offsetGet($object): mixed {}
26
27    /** @param object $object */
28    public function offsetSet($object, mixed $value): void {}
29
30    /** @param object $object */
31    public function offsetExists($object): bool {}
32
33    /** @param object $object */
34    public function offsetUnset($object): void {}
35
36    public function count(): int {}
37
38    public function getIterator(): Iterator {}
39}
40