<?php class test1 { public $foo; function get($a) { echo "Test 1: $a\n"; } } class test2 { function get($a) { echo "Test 2: $a\n"; } } $test = new test1(); $test->foo = new test2(); $prop = 'foo'; echo $test->$prop->get('test');
You have javascript disabled. You will not be able to edit any code.