dstuecken/php7ify

php7ify is a project that brings new php7 classes and exceptions to php 5.x.

Installs: 155 908

Dependents: 1

Suggesters: 0

Security: 0

Stars: 11

Watchers: 2

Forks: 1

Open Issues: 0

pkg:composer/dstuecken/php7ify

1.1.1 2020-03-10 00:51 UTC

This package is auto-updated.

Last update: 2025-09-10 12:19:35 UTC


README

php7ify is a project that brings new php7 classes, functions and exceptions to php 5.x

Build Status License Latest Stable Version Latest Unstable Version

Requirements

  • PHP 5.3

Installation

Using Composer

To install php7ify with composer, just add the following to your composer.json file:

{
    "require": {
        "dstuecken/php7ify": "1.0"
    }
}

or by running the following command:

composer require dstuecken/php7ify

Usage

Just use the new \Throwable interface in your php 5 project, or catch an \Error exception.

try 
{
    mysql_query();
}
catch (Error $e)
{
    echo $e->getMessage() . "\n\n";
    echo $e->getTraceAsString();
}