@@ -62,8 +62,8 @@ member, but never both at the same time. However, it doesn't know which member i
6262Remembering this is our job, and that's exactly what the ` IS_* ` constants are for.
6363
6464The top members of ` zend_value ` mostly mirror the ` IS_* ` constants, with the exception of
65- ` counted ` . ` counted ` polymorphically refers to any < a href = " todo " > reference counted</ a > value, including
66- strings, arrays, objects, resources and references. ` null ` and ` bool ` are missing from
65+ ` counted ` . ` counted ` polymorphically refers to any [ reference- counted] ( reference-counting.md ) value,
66+ including strings, arrays, objects, resources and references. ` null ` and ` bool ` are missing from
6767` zend_value ` because their types are self-contained.
6868
6969The rest of the fields aren't important for now.
@@ -108,8 +108,8 @@ struct _zval_struct {
108108
109109` zval.u1 ` stores the variable type, the given ` IS_* ` constant, along with some other flags. It's
110110definition looks a bit complicated. You can think of the entire field as a 4 byte integer, split
111- into 3 parts. ` v.type ` stores the actual variable type, ` v.type_flags ` is used for some <a
112- href="todo"> reference counting</ a > flags, and ` v.u.extra ` is pretty much unused.
111+ into 3 parts. ` v.type ` stores the actual variable type, ` v.type_flags ` is used for some
112+ [ reference- counting] ( reference-counting.md ) flags, and ` v.u.extra ` is pretty much unused.
113113
114114` zval.u2 ` defines some more storage for various contexts that is often unoccupied. It's there
115115because the memory would otherwise be wasted due to padding, so we may as well make use of it. We'll
@@ -135,8 +135,6 @@ there's a `_P`-suffixed variant that performs the same operation on a pointer to
135135| ` ZVAL_COPY_VALUE(t, s) ` | Copy one ` zval ` to another, including type and value. |
136136| ` ZVAL_COPY(t, s) ` | Same as ` ZVAL_COPY_VALUE ` , but if the value is reference counted, increase the counter. |
137137
138- <!-- _todo: There are many more. -->
139-
140138## Other zval types
141139
142140` zval ` s are sometimes used internally with types that don't exist in userland.
@@ -153,16 +151,14 @@ there's a `_P`-suffixed variant that performs the same operation on a pointer to
153151property/parameter initializers, etc.) before they are evaluated. The evaluation of a constant
154152expression is not always possible during compilation, because they may contain references to values
155153only available at runtime. Until that evaluation is possible, the constants contain the AST of the
156- expression rather than the concrete values. Check the <a href="todo">parser</a> chapter for more information
157- on ASTs. When this flag is set, the `zval.value.ast` union member is set accordingly.
154+ expression rather than the concrete values. When this flag is set, the `zval.value.ast` union member
155+ is set accordingly.
158156
159157`IS_INDIRECT` indicates that the `zval.value.zv` member is populated. This field stores a
160158pointer to some other `zval`. This type is mainly used in two situations, namely for intermediate
161159values between `FETCH` and `ASSIGN` instructions, and for the sharing of variables in the symbol
162160table.
163161
164- <!-- _todo: There are many more. -->
165-
166162`IS_PTR` is used for pointers to arbitrary data. Most commonly, this type is used internally for
167163`HashTable`, as `HashTable` may only store `zval` values. For example, `EG(class_table)`
168164represents the class table, which is a hash map of class names to the corresponding
@@ -173,8 +169,7 @@ Otherwise, it is essentially the same as `IS_PTR`. Arbitrary data is accessed th
173169`zval.value.ptr`, and casted to the correct type depending on context. If `ptr` stores a class
174170or function, the `zval.value.ce` or `zval.value.func` fields may be used, respectively.
175171
176- `_IS_ERROR` is used as an error value for some <a href="todo">object handlers</a>. It is described in more
177- detail in its own chapter.
172+ `_IS_ERROR` is used as an error value for some object handlers.
178173
179174```c
180175/* Fake types used only for type hinting.
@@ -192,7 +187,7 @@ detail in its own chapter.
192187```
193188
194189These flags are never actually stored in `zval.u1`. They are used for type hinting and in the
195- <a href= " todo " > object handler</a> API .
190+ object handler API .
196191
197192This only leaves the `zval.value.ww` field. In short , this field is used on 32 -bit platforms when
198193copying data from one `zval` to another. Normally, `zval.value.counted` is copied as a generic
0 commit comments