This question doesn't even make any sense.
They should be used in conjunction with each other, not as alternatives to each other. This is a clear test to see if you even have the slightest idea of what you are talking about. If you cannot point out this simple false dichotomy and answer how these are used with each other, then you've clearly never been exposed to the concept of the LAMP stack and probably don't know much about web development.