depth = $depth; } public function output($val) { return "$this->depth-$val"; } public function forLoop($number) { $ret = []; for ($i = 0; $i < (int)$number; ++$i) { $ret[] = new TestObject("!$i"); } return new ArrayList($ret); } public function forWith($number) { return new self($number); } }