- print_r: documentation ( source)
<?php
class Test
{
private $private = "";
public function add($string) {
$this->private[] = $string;
}
public function evaluate(Test $container) {
return $container->private;
}
}
$test = new Test();
$test->add("zero");
$test->add("one");
$test->add("two");
$result = new Test();
print_r($test->private);