Is it possible to pass an object as an argument in a function? I have two classes and one class has a method which needs to be passed an instance of the other class for example:
class A {
var name;
}
class B {
function something($obj) {
echo($obj->name);
}
}
$a = new A;
$b = new B;
$a->name="testing";
$b->something($a);
This won't work.