[php-src] Issue #13335: Php8.4 PHP_ROUND_AWAY_FROM_ZERO Usable But Defined Says It Doesn't Exist
| From: | oleibman | Date: | Tue, 06 Feb 2024 09:20:20 +0000 |
| Subject: | [php-src] Issue #13335: Php8.4 PHP_ROUND_AWAY_FROM_ZERO Usable But Defined Says It Doesn't Exist | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246413@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13335
Author: oleibman
### Description
The following code:
```php
<?php
var_dump(PHP_ROUND_AWAY_FROM_ZERO, defined(PHP_ROUND_AWAY_FROM_ZERO));
```
Resulted in this output:
```
int(8)
bool(false)
```
But I expected this output instead:
```
int(8) // value is immaterial but this seems to indicate it *is* defined
bool(true)
```
This makes it difficult to test if the constant is defined before using it.
### PHP Version
Latest nightly
### Operating System
Windows 11, but probably all