1--TEST--
2Implicit float to int conversions should warn for literals in combined assingment operetor
3--FILE--
4<?php
5
6echo 'Bitwise ops:' . \PHP_EOL;
7
8$var = 3;
9$var |= 1.5;
10var_dump($var);
11
12$var = 3;
13$var &= 1.5;
14var_dump($var);
15
16$var = 3;
17$var ^= 1.5;
18var_dump($var);
19
20$var = 3;
21$var <<= 1.5;
22var_dump($var);
23
24$var = 3;
25$var >>= 1.5;
26var_dump($var);
27
28echo 'Modulo:' . \PHP_EOL;
29$var = 9;
30$var %= 2.5;
31var_dump($var);
32
33?>
34--EXPECTF--
35Bitwise ops:
36
37Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
38int(3)
39
40Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
41int(1)
42
43Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
44int(2)
45
46Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
47int(6)
48
49Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
50int(1)
51Modulo:
52
53Deprecated: Implicit conversion from float 2.5 to int loses precision in %s on line %d
54int(1)
55