[php-src] Issue #12776: Magic constant can be silently defined
| From: | mvorisek | Date: | Fri, 24 Nov 2023 23:36:29 +0000 |
| Subject: | [php-src] Issue #12776: Magic constant can be silently defined | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-245889@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/12776
Author: mvorisek
### Description
The following code:
```php
<?php
define('__LINE__', 1);
var_dump(__LINE__);
```
repro: https://3v4l.org/9rmLA
Resulted in this output:
exception, as
__LINE__ is magic constant and cannot be (re)defined
But I expected this output instead:
no exception
### PHP Version
any
### Operating System
any