xref: /PHP-7.3/tests/lang/bug24054.phpt (revision b746e698)
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(dirname(__FILE__) . '/../quicktester.inc');
21--EXPECT--
221,1,0,0
23OK
24