Expose PHP end of life date, allowing you to check if your version is supported.
composer require cyrosy/php-end-of-life
<?php
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);
}