xref: /PHP-8.3/tests/lang/bug27354.phpt (revision b8e380ab)
1--TEST--
2Bug #27354 (Modulus operator crashes PHP)
3--FILE--
4<?php
5var_dump(-2147483647 % -1);
6var_dump(-9_223_372_036_860_776_000 % -1); // Min value for 64bit int -1
7var_dump(-2147483648 % -1);
8var_dump(-2147483648 % -2);
9?>
10--EXPECTF--
11int(0)
12
13Deprecated: Implicit conversion from float -9.223372036860776E+18 to int loses precision in %s on line %d
14int(0)
15int(0)
16int(0)
17