Closed bkrukowski closed 4 years ago
https://github.com/php-defer/php-defer
https://blog.golang.org/defer-panic-and-recover https://tour.golang.org/flowcontrol/12
<?php function helloGoodbye() { defer($_, function () { echo "goodbye\n"; }); defer($_, function () { echo "...\n"; }); echo "hello\n"; } echo "before hello\n"; helloGoodbye(); echo "after goodbye\n"; // Output: // // before hello // hello // ... // goodbye // after goodbye
This looks interesting. Thanks.
Thanks :)
Library
https://github.com/php-defer/php-defer
Golang docs
https://blog.golang.org/defer-panic-and-recover https://tour.golang.org/flowcontrol/12
Example