php-src/Zend/tests/unary_minus_const_expr_consistency.phpt
Ilija Tovilo 41bbb116dd
Unary minus const expression consistency
- of 0.0 should result in -0.0

Closes GH-10978
2023-03-31 14:27:54 +02:00

17 lines
215 B
PHP

--TEST--
Unary minus constant expression consistency
--FILE--
<?php
const ZERO = 0.0;
const MINUS_ZERO = -ZERO;
$minus_zero = -ZERO;
var_dump(MINUS_ZERO);
var_dump($minus_zero);
?>
--EXPECT--
float(-0)
float(-0)