@wpkernel/php-json-ast v0.12.6-beta.3
@wpkernel/php-json-ast / buildArrayItem
Function: buildArrayItem()
ts
function buildArrayItem(
value,
options,
attributes?): PhpExprArrayItem;Builds a PHP array item node.
Parameters
value
The expression representing the item's value.
options
Optional configuration for the array item (key, by reference, unpack).
byRef?
boolean
key?
PhpExpr | null
unpack?
boolean
attributes?
Readonly<Record<string, unknown>>
Optional attributes for the node.
Returns
A PhpExprArrayItem node.
