xref: /PHP-8.0/tests/lang/bug24054.phpt (revision 7aacc705)
1--TEST--
2Bug #24054 (Assignment operator *= broken)
3--FILE--
4<?php
5
6define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF);
7define('LONG_MIN', -LONG_MAX - 1);
8printf("%d,%d,%d,%d\n",is_int(LONG_MIN  ),is_int(LONG_MAX  ),
9                       is_int(LONG_MIN-1),is_int(LONG_MAX+1));
10
11    $i = LONG_MAX;
12
13    $j = $i * 1001;
14    $i *= 1001;
15
16$tests = <<<TESTS
17$i === $j
18TESTS;
19
20include(__DIR__ . '/../quicktester.inc');
21?>
22--EXPECT--
231,1,0,0
24OK
25