mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
42c8f5e91d
This follows on froma4648ded43
and4e01269082
. Both -(+0.0) and +(-0.0) behaved incorrectly for the same reason.
18 lines
213 B
PHP
18 lines
213 B
PHP
--TEST--
|
|
Bug #70804 (Unary add on negative zero produces positive zero)
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(+(-0.0));
|
|
var_dump(+(float)"-0");
|
|
|
|
$foo = +(-sin(0));
|
|
|
|
var_dump($foo);
|
|
|
|
?>
|
|
--EXPECT--
|
|
float(-0)
|
|
float(-0)
|
|
float(-0)
|