cyrosy/php-end-of-life

Library exposing EOL dates of PHP versions

1.0.1 2020-09-15 09:25 UTC

This package is auto-updated.

Last update: 2024-04-11 16:00:54 UTC


README

CircleCI

Expose PHP end of life date, allowing you to check if your version is supported.

Installation

composer require cyrosy/php-end-of-life

Usage

<?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);
}