check all the php versions installed on mac code example Example: check php version mac In terminal write: > php -v