$person = new person(); $participants = new participants();
Then you want to set a variable inside participants with an object of the person, so you can use its function inside the class
$participants->person = $person;
Then you edit the name of the person:
$person->name = 'Marcus';
If I then call the getName function:
Will it echo out the name?
As I said, messy. But anyways, my question could probably be summed up in: If you set a variable inside class b, with an instance of class a, and then change a value of class a OUTSIDE of class b(for example in a controller); Will class b get that change? Or is it like when you assign the object to a variable inside class b, it copies class a AT THAT MOMENT, and every change you make to that object will not be in the variable in class b?
Fucked up question, but whatever, you get the point..