check php cli version ubuntu code example Example 1: php check version ubuntu php -version Example 2: check php version linux terminal /* in terminal type it*/ php -v