To build a dynamic and interactive PHP program, it is useful to output variables and their values. The PHP language allows for multiple methods of value output. This topic covers the standard methods of printing a value in PHP and where these methods can be used.
eval('2 + 2') returns
eval is available in the global scope. The lexical scope of the evaluation is the local scope unless invoked indirectly (e.g.
var geval = eval; geval(s);).
The use of
eval is strongly discouraged. See the Remarks section for details.
You can use hierarchical queries to retrieve data based on a natural hierarchical relationship between rows in a table
Dplyr and many modern libraries in R use non-standard evaluation (NSE) for interactive programming and standard evaluation (SE) for programming1.
For instance, the
summarise() function use non-standard evaluation but relies on the
summarise_() which uses standard evaluation.
The lazyeval library makes it easy to turn standard evaluation function into NSE functions.