Using Laravel, I created an app to summarize and chat with YouTube videos. Check it out!
Benjamin Crozat
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

Wait, there's more!

Be the first to comment!

Get help or share something of value with other readers!

Great deals for enterprise developers
  • ZoneWatcher
    Get instant alerts on DNS changes across all major providers, before your customers notice.
    25% off for 12 months using the promo code CROZAT.
    Try ZoneWatcher for free
  • Quickly build highly customizable admin panels for Laravel projects.
    20% off on the pro version using the promo code CROZAT.
    Try Backpack for free
  • 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
- / -