use of php.runtime.memory.output.VarExport in project jphp by jphp-compiler.
the class InfoFunctions method var_export.
public static Memory var_export(Environment env, TraceInfo trace, @Runtime.Reference Memory value, boolean returned) {
StringWriter writer = new StringWriter();
VarExport printer = new VarExport(env, writer);
printer.print(value);
if (printer.isRecursionExists()) {
env.warning(trace, "var_export does not handle circular references");
}
if (returned) {
return new StringMemory(writer.toString());
} else {
env.echo(writer.toString());
return Memory.TRUE;
}
}
Aggregations