Let's say I have the following method:
public function chooseCar($car)
{
return 'You chose this car: ' . $car;
}
I need to set specific values for what can be passed to chooseCar in the $car argument, for example let the developer choose between 'Mercedes', 'BMW' and 'Ford', is that doable in php?
$caras key or something like thatif elseeveryone seems to be suggesting before you read the SplEnum link i pasted above. They are so boring!