Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dstuecken/php7ify
php7ify is a polyfill project that brings new php7 classes and exceptions to php 5.x
https://github.com/dstuecken/php7ify
composer php php-polyfill php7
Last synced: 3 months ago
JSON representation
php7ify is a polyfill project that brings new php7 classes and exceptions to php 5.x
- Host: GitHub
- URL: https://github.com/dstuecken/php7ify
- Owner: dstuecken
- License: mit
- Created: 2015-12-14T14:30:09.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T00:58:18.000Z (almost 5 years ago)
- Last Synced: 2024-09-20T08:07:42.504Z (4 months ago)
- Topics: composer, php, php-polyfill, php7
- Language: PHP
- Homepage:
- Size: 23.4 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php7ify
php7ify is a project that brings new php7 classes, functions and exceptions to php 5.x
[![Build Status](https://travis-ci.org/dstuecken/php7ify.svg)](https://travis-ci.org/dstuecken/php7ify)
[![License](https://poser.pugx.org/dstuecken/php7ify/license)](https://packagist.org/packages/dstuecken/php7ify)
[![Latest Stable Version](https://poser.pugx.org/dstuecken/php7ify/v/stable)](https://packagist.org/packages/dstuecken/php7ify)
[![Latest Unstable Version](https://poser.pugx.org/dstuecken/php7ify/v/unstable)](https://packagist.org/packages/dstuecken/php7ify)## Requirements
* PHP 5.3
## Installation
### Using Composer
To install php7ify with composer, just add the following to your composer.json file:
```json
{
"require": {
"dstuecken/php7ify": "1.0"
}
}
```or by running the following command:
```shell
composer require dstuecken/php7ify
```# Usage
Just use the new \Throwable interface in your php 5 project, or catch an \Error exception.
```php
try
{
mysql_query();
}
catch (Error $e)
{
echo $e->getMessage() . "\n\n";
echo $e->getTraceAsString();
}
```