xref: /PHP-8.0/Zend/tests/bug52355.phpt (revision 31ef94cd)
1--TEST--
2Bug #52355 (Negating zero does not produce negative zero)
3--FILE--
4<?php
5
6var_dump(-0.0);
7var_dump(-(float)"0");
8
9$foo = -sin(0);
10
11var_dump($foo);
12
13try {
14    var_dump(1.0 / -0.0);
15} catch (\DivisionByZeroError $e) {
16    echo $e->getMessage() . \PHP_EOL;
17}
18
19?>
20--EXPECT--
21float(-0)
22float(-0)
23float(-0)
24Division by zero
25