how get information from Object?
$cars = new Cars($car_color, $car_id, $car_speed);
CAR_class::cars($cars, $car_speed);
Thanks
get_object_vars() is a winrar. :-D
Assuming you just mean to access the $cars object's variables...
You should have some sort of getter function within your Car class that returns the object's variables. for instance:
public function getColor() {
return $this->color;
}
Then you would call the function using something like:
$cars->getColor();
精彩评论