[php-src] Issue #22280: False positive on goto+finally
[email protected] (woodholly) Thu, 11 Jun 2026 13:04:53 +0000
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
Issue: https://github.com/php/php-src/issues/22280
Author: woodholly
### Description
Affected: PHP 8.2
Not affected: PHP 8.4.21 (compiles and runs fine)
```php
<?php
goto d;
try { } catch (\Throwable) { }
d: try { } finally { }
```
Resulted in this output:
```
PHP Fatal error: jump out of a finally block is disallowed in /tmp/repro.php on line 2
```
But I expected this output instead:
```
```
### PHP Version
```plain
php -v
PHP 8.2.31 (cli) (built: May 8 2026 07:20:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.31, Copyright (c) Zend Technologies
with Zend OPcache v8.2.31, Copyright (c), by Zend Technologies
```
### Operating System
Debian 12