@@ -31,13 +31,13 @@ $legalValues = [
31
31
'true ' ,
32
32
'false ' ,
33
33
'2 ' ,
34
- '3.5 ' ,
34
+ '3.5 ' , // Semi-legal for certain ops
35
35
'"123" ' ,
36
36
'"123foo" ' , // Semi-legal
37
37
];
38
38
39
39
set_error_handler (function ($ errno , $ errstr ) {
40
- assert ($ errno == E_WARNING );
40
+ assert ($ errno == E_WARNING || $ errno == E_DEPRECATED );
41
41
echo "Warning: $ errstr \n" ;
42
42
});
43
43
@@ -453,6 +453,7 @@ Unsupported operand types: bool % array
453
453
Unsupported operand types: array % int
454
454
Unsupported operand types: int % array
455
455
Unsupported operand types: array % float
456
+ Warning: Implicit conversion to int from non-compatible float
456
457
Unsupported operand types: float % array
457
458
Unsupported operand types: array % string
458
459
Unsupported operand types: string % array
@@ -468,6 +469,7 @@ Unsupported operand types: bool % stdClass
468
469
Unsupported operand types: stdClass % int
469
470
Unsupported operand types: int % stdClass
470
471
Unsupported operand types: stdClass % float
472
+ Warning: Implicit conversion to int from non-compatible float
471
473
Unsupported operand types: float % stdClass
472
474
Unsupported operand types: stdClass % string
473
475
Unsupported operand types: string % stdClass
@@ -483,6 +485,7 @@ Unsupported operand types: bool % resource
483
485
Unsupported operand types: resource % int
484
486
Unsupported operand types: int % resource
485
487
Unsupported operand types: resource % float
488
+ Warning: Implicit conversion to int from non-compatible float
486
489
Unsupported operand types: float % resource
487
490
Unsupported operand types: resource % string
488
491
Unsupported operand types: string % resource
@@ -498,6 +501,7 @@ Unsupported operand types: bool % string
498
501
Unsupported operand types: string % int
499
502
Unsupported operand types: int % string
500
503
Unsupported operand types: string % float
504
+ Warning: Implicit conversion to int from non-compatible float
501
505
Unsupported operand types: float % string
502
506
Unsupported operand types: string % string
503
507
Unsupported operand types: string % string
@@ -605,6 +609,7 @@ Unsupported operand types: bool << array
605
609
Unsupported operand types: array << int
606
610
Unsupported operand types: int << array
607
611
Unsupported operand types: array << float
612
+ Warning: Implicit conversion to int from non-compatible float
608
613
Unsupported operand types: float << array
609
614
Unsupported operand types: array << string
610
615
Unsupported operand types: string << array
@@ -620,6 +625,7 @@ Unsupported operand types: bool << stdClass
620
625
Unsupported operand types: stdClass << int
621
626
Unsupported operand types: int << stdClass
622
627
Unsupported operand types: stdClass << float
628
+ Warning: Implicit conversion to int from non-compatible float
623
629
Unsupported operand types: float << stdClass
624
630
Unsupported operand types: stdClass << string
625
631
Unsupported operand types: string << stdClass
@@ -635,6 +641,7 @@ Unsupported operand types: bool << resource
635
641
Unsupported operand types: resource << int
636
642
Unsupported operand types: int << resource
637
643
Unsupported operand types: resource << float
644
+ Warning: Implicit conversion to int from non-compatible float
638
645
Unsupported operand types: float << resource
639
646
Unsupported operand types: resource << string
640
647
Unsupported operand types: string << resource
@@ -650,6 +657,7 @@ Unsupported operand types: bool << string
650
657
Unsupported operand types: string << int
651
658
Unsupported operand types: int << string
652
659
Unsupported operand types: string << float
660
+ Warning: Implicit conversion to int from non-compatible float
653
661
Unsupported operand types: float << string
654
662
Unsupported operand types: string << string
655
663
Unsupported operand types: string << string
@@ -681,6 +689,7 @@ Unsupported operand types: bool >> array
681
689
Unsupported operand types: array >> int
682
690
Unsupported operand types: int >> array
683
691
Unsupported operand types: array >> float
692
+ Warning: Implicit conversion to int from non-compatible float
684
693
Unsupported operand types: float >> array
685
694
Unsupported operand types: array >> string
686
695
Unsupported operand types: string >> array
@@ -696,6 +705,7 @@ Unsupported operand types: bool >> stdClass
696
705
Unsupported operand types: stdClass >> int
697
706
Unsupported operand types: int >> stdClass
698
707
Unsupported operand types: stdClass >> float
708
+ Warning: Implicit conversion to int from non-compatible float
699
709
Unsupported operand types: float >> stdClass
700
710
Unsupported operand types: stdClass >> string
701
711
Unsupported operand types: string >> stdClass
@@ -711,6 +721,7 @@ Unsupported operand types: bool >> resource
711
721
Unsupported operand types: resource >> int
712
722
Unsupported operand types: int >> resource
713
723
Unsupported operand types: resource >> float
724
+ Warning: Implicit conversion to int from non-compatible float
714
725
Unsupported operand types: float >> resource
715
726
Unsupported operand types: resource >> string
716
727
Unsupported operand types: string >> resource
@@ -726,6 +737,7 @@ Unsupported operand types: bool >> string
726
737
Unsupported operand types: string >> int
727
738
Unsupported operand types: int >> string
728
739
Unsupported operand types: string >> float
740
+ Warning: Implicit conversion to int from non-compatible float
729
741
Unsupported operand types: float >> string
730
742
Unsupported operand types: string >> string
731
743
Unsupported operand types: string >> string
@@ -757,6 +769,7 @@ Unsupported operand types: bool & array
757
769
Unsupported operand types: array & int
758
770
Unsupported operand types: int & array
759
771
Unsupported operand types: array & float
772
+ Warning: Implicit conversion to int from non-compatible float
760
773
Unsupported operand types: float & array
761
774
Unsupported operand types: array & string
762
775
Unsupported operand types: string & array
@@ -800,6 +813,7 @@ Unsupported operand types: bool & string
800
813
Unsupported operand types: string & int
801
814
Unsupported operand types: int & string
802
815
Unsupported operand types: string & float
816
+ Warning: Implicit conversion to int from non-compatible float
803
817
Unsupported operand types: float & string
804
818
No error for "foo" & "123"
805
819
No error for "123" & "foo"
@@ -830,6 +844,7 @@ Unsupported operand types: bool | array
830
844
Unsupported operand types: array | int
831
845
Unsupported operand types: int | array
832
846
Unsupported operand types: array | float
847
+ Warning: Implicit conversion to int from non-compatible float
833
848
Unsupported operand types: float | array
834
849
Unsupported operand types: array | string
835
850
Unsupported operand types: string | array
@@ -873,6 +888,7 @@ Unsupported operand types: bool | string
873
888
Unsupported operand types: string | int
874
889
Unsupported operand types: int | string
875
890
Unsupported operand types: string | float
891
+ Warning: Implicit conversion to int from non-compatible float
876
892
Unsupported operand types: float | string
877
893
No error for "foo" | "123"
878
894
No error for "123" | "foo"
@@ -903,6 +919,7 @@ Unsupported operand types: bool ^ array
903
919
Unsupported operand types: array ^ int
904
920
Unsupported operand types: int ^ array
905
921
Unsupported operand types: array ^ float
922
+ Warning: Implicit conversion to int from non-compatible float
906
923
Unsupported operand types: float ^ array
907
924
Unsupported operand types: array ^ string
908
925
Unsupported operand types: string ^ array
@@ -946,6 +963,7 @@ Unsupported operand types: bool ^ string
946
963
Unsupported operand types: string ^ int
947
964
Unsupported operand types: int ^ string
948
965
Unsupported operand types: string ^ float
966
+ Warning: Implicit conversion to int from non-compatible float
949
967
Unsupported operand types: float ^ string
950
968
No error for "foo" ^ "123"
951
969
No error for "123" ^ "foo"
@@ -1449,6 +1467,7 @@ Unsupported operand types: bool % array
1449
1467
Unsupported operand types: array % int
1450
1468
Unsupported operand types: int % array
1451
1469
Unsupported operand types: array % float
1470
+ Warning: Implicit conversion to int from non-compatible float
1452
1471
Unsupported operand types: float % array
1453
1472
Unsupported operand types: array % string
1454
1473
Unsupported operand types: string % array
@@ -1464,6 +1483,7 @@ Unsupported operand types: bool % stdClass
1464
1483
Unsupported operand types: stdClass % int
1465
1484
Unsupported operand types: int % stdClass
1466
1485
Unsupported operand types: stdClass % float
1486
+ Warning: Implicit conversion to int from non-compatible float
1467
1487
Unsupported operand types: float % stdClass
1468
1488
Unsupported operand types: stdClass % string
1469
1489
Unsupported operand types: string % stdClass
@@ -1479,6 +1499,7 @@ Unsupported operand types: bool % resource
1479
1499
Unsupported operand types: resource % int
1480
1500
Unsupported operand types: int % resource
1481
1501
Unsupported operand types: resource % float
1502
+ Warning: Implicit conversion to int from non-compatible float
1482
1503
Unsupported operand types: float % resource
1483
1504
Unsupported operand types: resource % string
1484
1505
Unsupported operand types: string % resource
@@ -1494,6 +1515,7 @@ Unsupported operand types: bool % string
1494
1515
Unsupported operand types: string % int
1495
1516
Unsupported operand types: int % string
1496
1517
Unsupported operand types: string % float
1518
+ Warning: Implicit conversion to int from non-compatible float
1497
1519
Unsupported operand types: float % string
1498
1520
Unsupported operand types: string % string
1499
1521
Unsupported operand types: string % string
@@ -1601,6 +1623,7 @@ Unsupported operand types: bool << array
1601
1623
Unsupported operand types: array << int
1602
1624
Unsupported operand types: int << array
1603
1625
Unsupported operand types: array << float
1626
+ Warning: Implicit conversion to int from non-compatible float
1604
1627
Unsupported operand types: float << array
1605
1628
Unsupported operand types: array << string
1606
1629
Unsupported operand types: string << array
@@ -1616,6 +1639,7 @@ Unsupported operand types: bool << stdClass
1616
1639
Unsupported operand types: stdClass << int
1617
1640
Unsupported operand types: int << stdClass
1618
1641
Unsupported operand types: stdClass << float
1642
+ Warning: Implicit conversion to int from non-compatible float
1619
1643
Unsupported operand types: float << stdClass
1620
1644
Unsupported operand types: stdClass << string
1621
1645
Unsupported operand types: string << stdClass
@@ -1631,6 +1655,7 @@ Unsupported operand types: bool << resource
1631
1655
Unsupported operand types: resource << int
1632
1656
Unsupported operand types: int << resource
1633
1657
Unsupported operand types: resource << float
1658
+ Warning: Implicit conversion to int from non-compatible float
1634
1659
Unsupported operand types: float << resource
1635
1660
Unsupported operand types: resource << string
1636
1661
Unsupported operand types: string << resource
@@ -1646,6 +1671,7 @@ Unsupported operand types: bool << string
1646
1671
Unsupported operand types: string << int
1647
1672
Unsupported operand types: int << string
1648
1673
Unsupported operand types: string << float
1674
+ Warning: Implicit conversion to int from non-compatible float
1649
1675
Unsupported operand types: float << string
1650
1676
Unsupported operand types: string << string
1651
1677
Unsupported operand types: string << string
@@ -1677,6 +1703,7 @@ Unsupported operand types: bool >> array
1677
1703
Unsupported operand types: array >> int
1678
1704
Unsupported operand types: int >> array
1679
1705
Unsupported operand types: array >> float
1706
+ Warning: Implicit conversion to int from non-compatible float
1680
1707
Unsupported operand types: float >> array
1681
1708
Unsupported operand types: array >> string
1682
1709
Unsupported operand types: string >> array
@@ -1692,6 +1719,7 @@ Unsupported operand types: bool >> stdClass
1692
1719
Unsupported operand types: stdClass >> int
1693
1720
Unsupported operand types: int >> stdClass
1694
1721
Unsupported operand types: stdClass >> float
1722
+ Warning: Implicit conversion to int from non-compatible float
1695
1723
Unsupported operand types: float >> stdClass
1696
1724
Unsupported operand types: stdClass >> string
1697
1725
Unsupported operand types: string >> stdClass
@@ -1707,6 +1735,7 @@ Unsupported operand types: bool >> resource
1707
1735
Unsupported operand types: resource >> int
1708
1736
Unsupported operand types: int >> resource
1709
1737
Unsupported operand types: resource >> float
1738
+ Warning: Implicit conversion to int from non-compatible float
1710
1739
Unsupported operand types: float >> resource
1711
1740
Unsupported operand types: resource >> string
1712
1741
Unsupported operand types: string >> resource
@@ -1722,6 +1751,7 @@ Unsupported operand types: bool >> string
1722
1751
Unsupported operand types: string >> int
1723
1752
Unsupported operand types: int >> string
1724
1753
Unsupported operand types: string >> float
1754
+ Warning: Implicit conversion to int from non-compatible float
1725
1755
Unsupported operand types: float >> string
1726
1756
Unsupported operand types: string >> string
1727
1757
Unsupported operand types: string >> string
@@ -1753,6 +1783,7 @@ Unsupported operand types: bool & array
1753
1783
Unsupported operand types: array & int
1754
1784
Unsupported operand types: int & array
1755
1785
Unsupported operand types: array & float
1786
+ Warning: Implicit conversion to int from non-compatible float
1756
1787
Unsupported operand types: float & array
1757
1788
Unsupported operand types: array & string
1758
1789
Unsupported operand types: string & array
@@ -1768,6 +1799,7 @@ Unsupported operand types: bool & stdClass
1768
1799
Unsupported operand types: stdClass & int
1769
1800
Unsupported operand types: int & stdClass
1770
1801
Unsupported operand types: stdClass & float
1802
+ Warning: Implicit conversion to int from non-compatible float
1771
1803
Unsupported operand types: float & stdClass
1772
1804
Unsupported operand types: stdClass & string
1773
1805
Unsupported operand types: string & stdClass
@@ -1783,6 +1815,7 @@ Unsupported operand types: bool & resource
1783
1815
Unsupported operand types: resource & int
1784
1816
Unsupported operand types: int & resource
1785
1817
Unsupported operand types: resource & float
1818
+ Warning: Implicit conversion to int from non-compatible float
1786
1819
Unsupported operand types: float & resource
1787
1820
Unsupported operand types: resource & string
1788
1821
Unsupported operand types: string & resource
@@ -1798,6 +1831,7 @@ Unsupported operand types: bool & string
1798
1831
Unsupported operand types: string & int
1799
1832
Unsupported operand types: int & string
1800
1833
Unsupported operand types: string & float
1834
+ Warning: Implicit conversion to int from non-compatible float
1801
1835
Unsupported operand types: float & string
1802
1836
No error for "foo" &= "123"
1803
1837
No error for "123" &= "foo"
@@ -1828,6 +1862,7 @@ Unsupported operand types: bool | array
1828
1862
Unsupported operand types: array | int
1829
1863
Unsupported operand types: int | array
1830
1864
Unsupported operand types: array | float
1865
+ Warning: Implicit conversion to int from non-compatible float
1831
1866
Unsupported operand types: float | array
1832
1867
Unsupported operand types: array | string
1833
1868
Unsupported operand types: string | array
@@ -1843,6 +1878,7 @@ Unsupported operand types: bool | stdClass
1843
1878
Unsupported operand types: stdClass | int
1844
1879
Unsupported operand types: int | stdClass
1845
1880
Unsupported operand types: stdClass | float
1881
+ Warning: Implicit conversion to int from non-compatible float
1846
1882
Unsupported operand types: float | stdClass
1847
1883
Unsupported operand types: stdClass | string
1848
1884
Unsupported operand types: string | stdClass
@@ -1858,6 +1894,7 @@ Unsupported operand types: bool | resource
1858
1894
Unsupported operand types: resource | int
1859
1895
Unsupported operand types: int | resource
1860
1896
Unsupported operand types: resource | float
1897
+ Warning: Implicit conversion to int from non-compatible float
1861
1898
Unsupported operand types: float | resource
1862
1899
Unsupported operand types: resource | string
1863
1900
Unsupported operand types: string | resource
@@ -1873,6 +1910,7 @@ Unsupported operand types: bool | string
1873
1910
Unsupported operand types: string | int
1874
1911
Unsupported operand types: int | string
1875
1912
Unsupported operand types: string | float
1913
+ Warning: Implicit conversion to int from non-compatible float
1876
1914
Unsupported operand types: float | string
1877
1915
No error for "foo" |= "123"
1878
1916
No error for "123" |= "foo"
@@ -1903,6 +1941,7 @@ Unsupported operand types: bool ^ array
1903
1941
Unsupported operand types: array ^ int
1904
1942
Unsupported operand types: int ^ array
1905
1943
Unsupported operand types: array ^ float
1944
+ Warning: Implicit conversion to int from non-compatible float
1906
1945
Unsupported operand types: float ^ array
1907
1946
Unsupported operand types: array ^ string
1908
1947
Unsupported operand types: string ^ array
@@ -1918,6 +1957,7 @@ Unsupported operand types: bool ^ stdClass
1918
1957
Unsupported operand types: stdClass ^ int
1919
1958
Unsupported operand types: int ^ stdClass
1920
1959
Unsupported operand types: stdClass ^ float
1960
+ Warning: Implicit conversion to int from non-compatible float
1921
1961
Unsupported operand types: float ^ stdClass
1922
1962
Unsupported operand types: stdClass ^ string
1923
1963
Unsupported operand types: string ^ stdClass
@@ -1933,6 +1973,7 @@ Unsupported operand types: bool ^ resource
1933
1973
Unsupported operand types: resource ^ int
1934
1974
Unsupported operand types: int ^ resource
1935
1975
Unsupported operand types: resource ^ float
1976
+ Warning: Implicit conversion to int from non-compatible float
1936
1977
Unsupported operand types: float ^ resource
1937
1978
Unsupported operand types: resource ^ string
1938
1979
Unsupported operand types: string ^ resource
@@ -1948,6 +1989,7 @@ Unsupported operand types: bool ^ string
1948
1989
Unsupported operand types: string ^ int
1949
1990
Unsupported operand types: int ^ string
1950
1991
Unsupported operand types: string ^ float
1992
+ Warning: Implicit conversion to int from non-compatible float
1951
1993
Unsupported operand types: float ^ string
1952
1994
No error for "foo" ^= "123"
1953
1995
No error for "123" ^= "foo"
0 commit comments