Remove windows encoding from `.php` files
[hiphop-php.git] / hphp / test / zend / good / tests / lang / operators / operator_lt_variation_64bit.php
blobca5da35c84dacf0e46b98fd9f66cf4b203759967
1 <?php
3 define("MAX_64Bit", 9223372036854775807);
4 define("MAX_32Bit", 2147483647);
5 define("MIN_64Bit", -9223372036854775807 - 1);
6 define("MIN_32Bit", -2147483647 - 1);
8 $validLessThan = array (
9 2147483646, array(MAX_32Bit, "2147483647", "2147483647.001", 2.147483647e9, 2147483647.9),
10 MIN_32Bit, array(MIN_32Bit + 1, "-2147483647", "-2147483646.001", -2.1474836461e9, -2147483646.9),
13 $invalidLessThan = array (
14 MAX_32Bit, array("2147483646", 2.1474836460001e9, MAX_32Bit - 1),
15 MIN_32Bit, array(MIN_32Bit - 1, "-2147483649", -2.1474836480001e9)
18 $failed = false;
19 // test for equality
20 for ($i = 0; $i < count($validLessThan); $i +=2) {
21 $typeToTestVal = $validLessThan[$i];
22 $compares = $validLessThan[$i + 1];
23 foreach($compares as $compareVal) {
24 if ($typeToTestVal < $compareVal) {
25 // do nothing
27 else {
28 echo "FAILED: '$typeToTestVal' >= '$compareVal'\n";
29 $failed = true;
33 // test for invalid values
34 for ($i = 0; $i < count($invalidLessThan); $i +=2) {
35 $typeToTestVal = $invalidLessThan[$i];
36 $compares = $invalidLessThan[$i + 1];
37 foreach($compares as $compareVal) {
38 if ($typeToTestVal < $compareVal) {
39 echo "FAILED: '$typeToTestVal' < '$compareVal'\n";
40 $failed = true;
45 if ($failed == false) {
46 echo "Test Passed\n";
50 ===DONE===