[php-src] PR #20786: WIP: Zend: add native defer keyword (parser/compiler + VM opcodes)
| From: | khaledalam | Date: | Fri, 26 Dec 2025 15:04:45 +0000 |
| Subject: | [php-src] PR #20786: WIP: Zend: add native defer keyword (parser/compiler + VM opcodes) | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-34386@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/20786
Author: khaledalam
- Add T_DEFER token and ZEND_AST_DEFER AST node
- Compile defer blocks by emitting a skip JMP + trailing JMP back
- Add DEFER_PUSH/DEFER_RUN VM handlers using per-call defer_stack
- Run defers before explicit/implicit returns (LIFO)
- Add initial PHPT tests (basic/LIFO/early return/vars); exception unwind not yet supported