I created an easy to use API to help businesses do incredible things with AI.
Laravel PHP

6 ways to check which version of PHP you are running

Benjamin Crozat
Published on Sep 2, 2023 0 comments Edit on GitHub
6 ways to check which version of PHP you are running

The quickest way to check your version of PHP

To check your version of PHP, simply run the php -v command, no matter if you are running macOS, Linux, or Windows.

6 ways to check your version of PHP

Using phpversion()

Checking the version of PHP using phpversion.

To check which version of PHP you are running, you use the phpversion() function. It returns a single string containing the precious information.

<?php echo phpversion(); ?>

Using phpinfo()

Checking the version of PHP using phpinfo.

To check which version of PHP you are running, use the phpinfo() function. It will show you a web page containing every bit of information you might need about your installation of PHP.

<?php phpinfo(); ?>

Using the terminal on macOS, Linux and WSL

Checking the version of PHP using the terminal on macOS and Linux.

To check which version of PHP you are running using your terminal on macOS or Linux, use the php -v command. It’s simple and straightforward, the version of PHP is the first thing in the output.

php -v

Using the command prompt on Windows

To check which version of PHP you are running using your Windows command prompt, use the php -v command. It’s as simple and straightforward as in the previous section.

php -v

Using Laravel’s welcome page

Checking the version of PHP using Laravel’s homepage.

To check which version of PHP you are running using Laravel’s welcome page, just look at the bottom right corner. It’s that simple.

Using Laravel Artisan

Checking the version of PHP using Laravel Artisan.

To check which version of PHP you are running using Laravel, use the php artisan about command. It will show you the version of PHP, including various information about your setup.

php artisan about

Be the first to comment!

Get help or share something of value with other readers!

Great deals for enterprise developers
  • Summarize and talk to YouTube videos. Bypass ads, sponsors, chit-chat, and get to the point.
    Try Nobinge →
  • Monitor the health of your apps: downtimes, certificates, broken links, and more.
    20% off the first 3 months using the promo code CROZAT.
    Try Oh Dear for free
  • Keep the customers coming; monitor your Google rankings.
    30% off your first month using the promo code WELCOME30
    Try Wincher for free →
The latest community links
- / -