eval

Synopsis

$ eval("code")

Parses and evaluates the specified sleep code returning the value of the code.

Parameters

"code" - a string containing the statements to evaluate.

Returns

The result of the statements once parsed and evaluated.

Side Effects / Notes

Errors

Examples

$x = 5; $cond = '$x < 8'; eval('while ('.$cond.') { println("val: $x"); $x++; }');

val: 5 val: 6 val: 7

See Also