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: about 1 year 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 (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T00:58:18.000Z (about 6 years ago)
- Last Synced: 2025-03-25T16:21:12.991Z (about 1 year ago)
- Topics: composer, php, php-polyfill, php7
- Language: PHP
- Homepage:
- Size: 23.4 KB
- Stars: 11
- Watchers: 2
- 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
[](https://travis-ci.org/dstuecken/php7ify)
[](https://packagist.org/packages/dstuecken/php7ify)
[](https://packagist.org/packages/dstuecken/php7ify)
[](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();
}
```