Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created August 28, 2015 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/a7bf22ad1c00eb0e5f1f to your computer and use it in GitHub Desktop.
Save joshfeck/a7bf22ad1c00eb0e5f1f to your computer and use it in GitHub Desktop.
You can use this to verify PHP version info for your server.
<?php
if ( version_compare( PHP_VERSION, '5.0.0', '>=' ) ) {
echo 'I am using PHP 5, my PHP_VERSION: ' . PHP_VERSION;
}
echo '<br>My phpversion(): ' . phpversion();
if ( defined ( 'PHP_VERSION_ID' ) ) {
echo '<br>My PHP_VERSION_ID: ' . PHP_VERSION_ID;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment