<?php class Test { private $db = 'my database name'; } $dbName = function(Test $test) { return $test->db; }; $test = new Test(); var_dump($dbName($test));
You have javascript disabled. You will not be able to edit any code.