1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 18:22:42 +01:00
Files
archived-php-src/ext/opcache/tests/bug75938.phpt
Nikita Popov 7aac61ce76 Fixed bug #75938
New modulus range inference implementation has been verified using
https://gist.github.com/nikic/67947ff92cf0e1f7e931f2f0d4cf817f.

The computed bounds are not tight, but it seems to be very hard to
compute tight bounds on modulus operations.
2018-02-09 15:10:23 +01:00

17 lines
285 B
PHP

--TEST--
Bug #75938: Modulus value not stored in variable
--FILE--
<?php
function borken($columns) {
$columns = (int) $columns;
if ($columns < 1) return 0;
$count = count([1,2,3,4,5]);
var_dump($mod = ($count % $columns));
var_dump($mod);
}
borken(2);
?>
--EXPECT--
int(1)
int(1)