PHP code example of cyrosy / php-end-of-life

1. Go to this page and download the library: Download cyrosy/php-end-of-life library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cyrosy / php-end-of-life example snippets



use \Cyrosy\PhpEndOfLife\PhpEndOfLife;

$currentVersion = (float) phpversion();

if (!PhpEndOfLife::isSupported($currentVersion)) {
    user_error(sprintf('Your current PHP version %s is not supported ! You should upgrade to prevent security exploits.', $currentVersion), E_USER_WARNING);
}