<?php class Test { private $x = 123; public function __construct($x) { $this->x = $x; } public function printX($test) { print $test->x; } } $test1 = new Test(123); $test2 = new Test(345); $test1->printX($test2);
You have javascript disabled. You will not be able to edit any code.