Is it possible to call a function and supply it with a class? Something like:
function foo(class $class) {
// do something with the class
echo $class->id;
}
// calling the function
foo(class Bar {
// supplying the class
public $id, $username, $password, $time, $ip;
});