Open Tigrov opened 3 weeks ago
Sounds good from a performance perspective. The only thing is that checks such as is_array
would become instanceof ArrayResult
or something alike.
Actually I think about ArrayExpression
which already realizes ArrayAccess
, Countable
and IteratorAggregate
interfaces and the check should be is_iterable()
.
Expression is logically an input. Not sure it is a good idea to reuse for results.
Suggested to store in
ArrayExpression
,StructuredExpression
andJsonExpression
the string value retrieved from the database and convert it to anarray
or other PHP representation as the data is accessed.This will save resources if the data is not used during execution.
Can be optionally.