php-src/Zend/tests/zend_signed_multiply-64bit.phpt
Nikita Popov a939805641 Use serialize_precision for var_dump()
var_dump() is debugging functionality, so it should print
floating-point numbers accurately. We do this by switching
to serialize_precision, which (by default) will print with
as much precision as necessary to preserve the exact value
of the float.

This also affects debug_zval_dump().

Closes GH-5172.
2020-02-25 09:51:32 +01:00

15 lines
344 B
PHP

--TEST--
Zend signed multiply 64-bit, variation 1
--SKIPIF--
<?php if ((1 << 31) < 0) print "skip Running on 32-bit target"; ?>
--FILE--
<?php
var_dump(0x80000000 * -0xffffffff);
var_dump(0x80000001 * 0xfffffffe);
var_dump(0x80000001 * -0xffffffff);
?>
--EXPECT--
int(-9223372034707292160)
int(9223372036854775806)
float(-9.22337203900226E+18)