[php-src] Issue #19081: Invalid error line in Fatal Error message
| From: | HardlinePeak | Date: | Wed, 09 Jul 2025 19:10:18 +0000 |
| Subject: | [php-src] Issue #19081: Invalid error line in Fatal Error message | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-250401@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/19081
Author: HardlinePeak
### Description
The following code:
```php
<?php
class Test {
public function __construct(
public callable $example
) {}
}
```
Resulted in this output:
```
Fatal error: Property Test::$example cannot have type callable in /in/XWh84 on line 3
```
But I expected this output instead:
```
Fatal error: Property Test::$example cannot have type callable in /in/XWh84 on line 4
```
### PHP Version
```plain
PHP 8.2.0 - 8.2.29, 8.3.0 - 8.3.23, 8.4.1 - 8.4.10
```
### Operating System
_No response_