use of php.runtime.memory.output.Printer in project jphp by jphp-compiler.
the class InfoFunctions method print_r.
public static Memory print_r(Environment env, @Runtime.Reference Memory value, boolean returned) {
StringWriter writer = new StringWriter();
Printer printer = new PrintR(env, writer);
printer.print(value);
if (returned) {
return new StringMemory(writer.toString());
} else {
env.echo(writer.toString());
return Memory.TRUE;
}
}
Aggregations