<?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($result->evaluate($test));
You have javascript disabled. You will not be able to edit any code.