PHP - passing variables to classes
问题 I trying to learn OOP and I've made this class class boo{ function boo(&another_class, $some_normal_variable){ $some_normal_variable = $another_class->do_something(); } function do_stuff(){ // how can I access '$another_class' and '$some_normal_variable' here? return $another_class->get($some_normal_variable); } } and I call this somewhere inside the another_class class like $bla = new boo($bla, $foo); echo $bla->do_stuff(); But I don't know how to access $bla, $foo inside the do_stuff