https://github.com/php-defer/php-defer
Golang's defer statement for PHP
https://github.com/php-defer/php-defer
Last synced: 1 day ago
JSON representation
Golang's defer statement for PHP
- Host: GitHub
- URL: https://github.com/php-defer/php-defer
- Owner: php-defer
- License: mit
- Created: 2019-10-08T20:36:56.000Z (over 5 years ago)
- Default Branch: 5.0
- Last Pushed: 2023-09-21T16:40:15.000Z (over 1 year ago)
- Last Synced: 2025-04-11T22:16:49.314Z (5 days ago)
- Language: PHP
- Size: 64.5 KB
- Stars: 302
- Watchers: 8
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-php - PHP Defer - Golang's defer statement for PHP. (Table of Contents / Event)
- awesome-php-cn - PHP Defer - 为PHP Golang推迟的语句. (目录 / 事件 Event)
- awesome-projects - PHP Defer - Golang's defer statement for PHP. (PHP / Event)
- awesome-php - PHP Defer - Golang's defer statement for PHP. (Table of Contents / Event)
README
# PHP Defer
[](https://coveralls.io/github/php-defer/php-defer?branch=5.0)
[](https://github.com/php-defer/php-defer/actions/workflows/tests.yml?query=branch%3A5.0)The [defer statement](https://blog.golang.org/defer-panic-and-recover) originally comes from Golang. This library allows you to use the defer functionality in your PHP code.
## Usage
```php