From 0b35e4a3be8c358046b98120b75128c2e4b27270 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 29 Jun 2015 13:05:14 +0300 Subject: [PATCH] Revert "Fixed last previously broken tests" This reverts commit 79b1832dd5086cd9b4a2e778a62f1743b548726c. --- Zend/tests/mod_001.phpt | 6 +- .../operators/divide_basiclong_64bit.phpt | 1054 +++++++++-------- tests/lang/operators/divide_variationStr.phpt | 687 ++++++----- .../operators/modulus_basiclong_64bit.phpt | 36 +- .../lang/operators/modulus_variationStr.phpt | 685 ++++++----- tests/run-test/test005.phpt | 5 +- tests/run-test/test008a.phpt | 5 +- 7 files changed, 1382 insertions(+), 1096 deletions(-) diff --git a/Zend/tests/mod_001.phpt b/Zend/tests/mod_001.phpt index d3388b8a3ad..8dda405abfb 100644 --- a/Zend/tests/mod_001.phpt +++ b/Zend/tests/mod_001.phpt @@ -9,12 +9,12 @@ $b = array(); try { $c = $a % $b; var_dump($c); -} catch (Error $e) { - echo "Error: " . $e->getMessage() . "\n"; +} catch (Exception $e) { + echo "Exception: " . $e->getMessage() . "\n"; } echo "Done\n"; ?> --EXPECTF-- -Error: Modulo by zero +Exception: Division by zero Done diff --git a/tests/lang/operators/divide_basiclong_64bit.phpt b/tests/lang/operators/divide_basiclong_64bit.phpt index b4566525775..c6bed0c88bc 100644 --- a/tests/lang/operators/divide_basiclong_64bit.phpt +++ b/tests/lang/operators/divide_basiclong_64bit.phpt @@ -18,7 +18,9 @@ $longVals = array( MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1 ); -$otherVals = array(1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit); +$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit); + +error_reporting(E_ERROR); foreach ($longVals as $longVal) { foreach($otherVals as $otherVal) { @@ -27,7 +29,7 @@ foreach ($longVals as $longVal) { } } -foreach (array_merge([0], $otherVals) as $otherVal) { +foreach ($otherVals as $otherVal) { foreach($longVals as $longVal) { echo "--- testing: $otherVal / $longVal ---\n"; var_dump($otherVal/$longVal); @@ -37,514 +39,544 @@ foreach (array_merge([0], $otherVals) as $otherVal) { ?> ===DONE=== --EXPECT-- ---- testing: 9223372036854775807 / 1 --- -int(9223372036854775807) ---- testing: 9223372036854775807 / -1 --- -int(-9223372036854775807) ---- testing: 9223372036854775807 / 7 --- -int(1317624576693539401) ---- testing: 9223372036854775807 / 9 --- -float(1.0248191152061E+18) ---- testing: 9223372036854775807 / 65 --- -float(1.4189803133623E+17) ---- testing: 9223372036854775807 / -44 --- -float(-2.096220917467E+17) ---- testing: 9223372036854775807 / 2147483647 --- -float(4294967298) ---- testing: 9223372036854775807 / 9223372036854775807 --- -int(1) ---- testing: -9223372036854775808 / 1 --- -int(-9223372036854775808) ---- testing: -9223372036854775808 / -1 --- -float(9.2233720368548E+18) ---- testing: -9223372036854775808 / 7 --- -float(-1.3176245766935E+18) ---- testing: -9223372036854775808 / 9 --- -float(-1.0248191152061E+18) ---- testing: -9223372036854775808 / 65 --- -float(-1.4189803133623E+17) ---- testing: -9223372036854775808 / -44 --- -float(2.096220917467E+17) ---- testing: -9223372036854775808 / 2147483647 --- -float(-4294967298) ---- testing: -9223372036854775808 / 9223372036854775807 --- -float(-1) ---- testing: 2147483647 / 1 --- -int(2147483647) ---- testing: 2147483647 / -1 --- -int(-2147483647) ---- testing: 2147483647 / 7 --- -float(306783378.14286) ---- testing: 2147483647 / 9 --- -float(238609294.11111) ---- testing: 2147483647 / 65 --- -float(33038209.953846) ---- testing: 2147483647 / -44 --- -float(-48806446.522727) ---- testing: 2147483647 / 2147483647 --- -int(1) ---- testing: 2147483647 / 9223372036854775807 --- -float(2.3283064354545E-10) ---- testing: -2147483648 / 1 --- -int(-2147483648) ---- testing: -2147483648 / -1 --- -int(2147483648) ---- testing: -2147483648 / 7 --- -float(-306783378.28571) ---- testing: -2147483648 / 9 --- -float(-238609294.22222) ---- testing: -2147483648 / 65 --- -float(-33038209.969231) ---- testing: -2147483648 / -44 --- -float(48806446.545455) ---- testing: -2147483648 / 2147483647 --- -float(-1.0000000004657) ---- testing: -2147483648 / 9223372036854775807 --- -float(-2.3283064365387E-10) ---- testing: 9223372034707292160 / 1 --- -int(9223372034707292160) ---- testing: 9223372034707292160 / -1 --- -int(-9223372034707292160) ---- testing: 9223372034707292160 / 7 --- -float(1.3176245763868E+18) ---- testing: 9223372034707292160 / 9 --- -float(1.0248191149675E+18) ---- testing: 9223372034707292160 / 65 --- -float(1.4189803130319E+17) ---- testing: 9223372034707292160 / -44 --- -float(-2.0962209169789E+17) ---- testing: 9223372034707292160 / 2147483647 --- -float(4294967297) ---- testing: 9223372034707292160 / 9223372036854775807 --- -float(0.99999999976717) ---- testing: -9223372034707292160 / 1 --- -int(-9223372034707292160) ---- testing: -9223372034707292160 / -1 --- -int(9223372034707292160) ---- testing: -9223372034707292160 / 7 --- -float(-1.3176245763868E+18) ---- testing: -9223372034707292160 / 9 --- -float(-1.0248191149675E+18) ---- testing: -9223372034707292160 / 65 --- -float(-1.4189803130319E+17) ---- testing: -9223372034707292160 / -44 --- -float(2.0962209169789E+17) ---- testing: -9223372034707292160 / 2147483647 --- -float(-4294967297) ---- testing: -9223372034707292160 / 9223372036854775807 --- -float(-0.99999999976717) ---- testing: 2147483648 / 1 --- -int(2147483648) ---- testing: 2147483648 / -1 --- -int(-2147483648) ---- testing: 2147483648 / 7 --- -float(306783378.28571) ---- testing: 2147483648 / 9 --- -float(238609294.22222) ---- testing: 2147483648 / 65 --- -float(33038209.969231) ---- testing: 2147483648 / -44 --- -float(-48806446.545455) ---- testing: 2147483648 / 2147483647 --- -float(1.0000000004657) ---- testing: 2147483648 / 9223372036854775807 --- -float(2.3283064365387E-10) ---- testing: -2147483649 / 1 --- -int(-2147483649) ---- testing: -2147483649 / -1 --- -int(2147483649) ---- testing: -2147483649 / 7 --- -float(-306783378.42857) ---- testing: -2147483649 / 9 --- -float(-238609294.33333) ---- testing: -2147483649 / 65 --- -float(-33038209.984615) ---- testing: -2147483649 / -44 --- -float(48806446.568182) ---- testing: -2147483649 / 2147483647 --- -float(-1.0000000009313) ---- testing: -2147483649 / 9223372036854775807 --- -float(-2.3283064376229E-10) ---- testing: 4294967294 / 1 --- -int(4294967294) ---- testing: 4294967294 / -1 --- -int(-4294967294) ---- testing: 4294967294 / 7 --- -float(613566756.28571) ---- testing: 4294967294 / 9 --- -float(477218588.22222) ---- testing: 4294967294 / 65 --- -float(66076419.907692) ---- testing: 4294967294 / -44 --- -float(-97612893.045455) ---- testing: 4294967294 / 2147483647 --- -int(2) ---- testing: 4294967294 / 9223372036854775807 --- -float(4.656612870909E-10) ---- testing: 4294967295 / 1 --- -int(4294967295) ---- testing: 4294967295 / -1 --- -int(-4294967295) ---- testing: 4294967295 / 7 --- -float(613566756.42857) ---- testing: 4294967295 / 9 --- -float(477218588.33333) ---- testing: 4294967295 / 65 --- -float(66076419.923077) ---- testing: 4294967295 / -44 --- -float(-97612893.068182) ---- testing: 4294967295 / 2147483647 --- -float(2.0000000004657) ---- testing: 4294967295 / 9223372036854775807 --- -float(4.6566128719932E-10) ---- testing: 4294967293 / 1 --- -int(4294967293) ---- testing: 4294967293 / -1 --- -int(-4294967293) ---- testing: 4294967293 / 7 --- -float(613566756.14286) ---- testing: 4294967293 / 9 --- -float(477218588.11111) ---- testing: 4294967293 / 65 --- -float(66076419.892308) ---- testing: 4294967293 / -44 --- -float(-97612893.022727) ---- testing: 4294967293 / 2147483647 --- -float(1.9999999995343) ---- testing: 4294967293 / 9223372036854775807 --- -float(4.6566128698248E-10) ---- testing: 9223372036854775806 / 1 --- -int(9223372036854775806) ---- testing: 9223372036854775806 / -1 --- -int(-9223372036854775806) ---- testing: 9223372036854775806 / 7 --- -float(1.3176245766935E+18) ---- testing: 9223372036854775806 / 9 --- -float(1.0248191152061E+18) ---- testing: 9223372036854775806 / 65 --- -float(1.4189803133623E+17) ---- testing: 9223372036854775806 / -44 --- -float(-2.096220917467E+17) ---- testing: 9223372036854775806 / 2147483647 --- -int(4294967298) ---- testing: 9223372036854775806 / 9223372036854775807 --- -float(1) ---- testing: 9.2233720368548E+18 / 1 --- -float(9.2233720368548E+18) ---- testing: 9.2233720368548E+18 / -1 --- -float(-9.2233720368548E+18) ---- testing: 9.2233720368548E+18 / 7 --- -float(1.3176245766935E+18) ---- testing: 9.2233720368548E+18 / 9 --- -float(1.0248191152061E+18) ---- testing: 9.2233720368548E+18 / 65 --- -float(1.4189803133623E+17) ---- testing: 9.2233720368548E+18 / -44 --- -float(-2.096220917467E+17) ---- testing: 9.2233720368548E+18 / 2147483647 --- -float(4294967298) ---- testing: 9.2233720368548E+18 / 9223372036854775807 --- -float(1) ---- testing: -9223372036854775807 / 1 --- -int(-9223372036854775807) ---- testing: -9223372036854775807 / -1 --- -int(9223372036854775807) ---- testing: -9223372036854775807 / 7 --- -int(-1317624576693539401) ---- testing: -9223372036854775807 / 9 --- -float(-1.0248191152061E+18) ---- testing: -9223372036854775807 / 65 --- -float(-1.4189803133623E+17) ---- testing: -9223372036854775807 / -44 --- -float(2.096220917467E+17) ---- testing: -9223372036854775807 / 2147483647 --- -float(-4294967298) ---- testing: -9223372036854775807 / 9223372036854775807 --- -int(-1) ---- testing: -9.2233720368548E+18 / 1 --- -float(-9.2233720368548E+18) ---- testing: -9.2233720368548E+18 / -1 --- -float(9.2233720368548E+18) ---- testing: -9.2233720368548E+18 / 7 --- -float(-1.3176245766935E+18) ---- testing: -9.2233720368548E+18 / 9 --- -float(-1.0248191152061E+18) ---- testing: -9.2233720368548E+18 / 65 --- -float(-1.4189803133623E+17) ---- testing: -9.2233720368548E+18 / -44 --- -float(2.096220917467E+17) ---- testing: -9.2233720368548E+18 / 2147483647 --- -float(-4294967298) ---- testing: -9.2233720368548E+18 / 9223372036854775807 --- -float(-1) ---- testing: 0 / 9223372036854775807 --- -int(0) ---- testing: 0 / -9223372036854775808 --- -int(0) ---- testing: 0 / 2147483647 --- -int(0) ---- testing: 0 / -2147483648 --- -int(0) ---- testing: 0 / 9223372034707292160 --- -int(0) ---- testing: 0 / -9223372034707292160 --- -int(0) ---- testing: 0 / 2147483648 --- -int(0) ---- testing: 0 / -2147483649 --- -int(0) ---- testing: 0 / 4294967294 --- -int(0) ---- testing: 0 / 4294967295 --- -int(0) ---- testing: 0 / 4294967293 --- -int(0) ---- testing: 0 / 9223372036854775806 --- -int(0) ---- testing: 0 / 9.2233720368548E+18 --- -float(0) ---- testing: 0 / -9223372036854775807 --- -int(0) ---- testing: 0 / -9.2233720368548E+18 --- -float(-0) ---- testing: 1 / 9223372036854775807 --- -float(1.0842021724855E-19) ---- testing: 1 / -9223372036854775808 --- -float(-1.0842021724855E-19) ---- testing: 1 / 2147483647 --- -float(4.6566128752458E-10) ---- testing: 1 / -2147483648 --- -float(-4.6566128730774E-10) ---- testing: 1 / 9223372034707292160 --- -float(1.0842021727379E-19) ---- testing: 1 / -9223372034707292160 --- -float(-1.0842021727379E-19) ---- testing: 1 / 2147483648 --- -float(4.6566128730774E-10) ---- testing: 1 / -2147483649 --- -float(-4.656612870909E-10) ---- testing: 1 / 4294967294 --- -float(2.3283064376229E-10) ---- testing: 1 / 4294967295 --- -float(2.3283064370808E-10) ---- testing: 1 / 4294967293 --- -float(2.328306438165E-10) ---- testing: 1 / 9223372036854775806 --- -float(1.0842021724855E-19) ---- testing: 1 / 9.2233720368548E+18 --- -float(1.0842021724855E-19) ---- testing: 1 / -9223372036854775807 --- -float(-1.0842021724855E-19) ---- testing: 1 / -9.2233720368548E+18 --- -float(-1.0842021724855E-19) ---- testing: -1 / 9223372036854775807 --- -float(-1.0842021724855E-19) ---- testing: -1 / -9223372036854775808 --- -float(1.0842021724855E-19) ---- testing: -1 / 2147483647 --- -float(-4.6566128752458E-10) ---- testing: -1 / -2147483648 --- -float(4.6566128730774E-10) ---- testing: -1 / 9223372034707292160 --- -float(-1.0842021727379E-19) ---- testing: -1 / -9223372034707292160 --- -float(1.0842021727379E-19) ---- testing: -1 / 2147483648 --- -float(-4.6566128730774E-10) ---- testing: -1 / -2147483649 --- -float(4.656612870909E-10) ---- testing: -1 / 4294967294 --- -float(-2.3283064376229E-10) ---- testing: -1 / 4294967295 --- -float(-2.3283064370808E-10) ---- testing: -1 / 4294967293 --- -float(-2.328306438165E-10) ---- testing: -1 / 9223372036854775806 --- -float(-1.0842021724855E-19) ---- testing: -1 / 9.2233720368548E+18 --- -float(-1.0842021724855E-19) ---- testing: -1 / -9223372036854775807 --- -float(1.0842021724855E-19) ---- testing: -1 / -9.2233720368548E+18 --- -float(1.0842021724855E-19) ---- testing: 7 / 9223372036854775807 --- -float(7.5894152073985E-19) ---- testing: 7 / -9223372036854775808 --- -float(-7.5894152073985E-19) ---- testing: 7 / 2147483647 --- -float(3.2596290126721E-9) ---- testing: 7 / -2147483648 --- -float(-3.2596290111542E-9) ---- testing: 7 / 9223372034707292160 --- -float(7.5894152091656E-19) ---- testing: 7 / -9223372034707292160 --- -float(-7.5894152091656E-19) ---- testing: 7 / 2147483648 --- -float(3.2596290111542E-9) ---- testing: 7 / -2147483649 --- -float(-3.2596290096363E-9) ---- testing: 7 / 4294967294 --- -float(1.629814506336E-9) ---- testing: 7 / 4294967295 --- -float(1.6298145059566E-9) ---- testing: 7 / 4294967293 --- -float(1.6298145067155E-9) ---- testing: 7 / 9223372036854775806 --- -float(7.5894152073985E-19) ---- testing: 7 / 9.2233720368548E+18 --- -float(7.5894152073985E-19) ---- testing: 7 / -9223372036854775807 --- -float(-7.5894152073985E-19) ---- testing: 7 / -9.2233720368548E+18 --- -float(-7.5894152073985E-19) ---- testing: 9 / 9223372036854775807 --- -float(9.7578195523695E-19) ---- testing: 9 / -9223372036854775808 --- -float(-9.7578195523695E-19) ---- testing: 9 / 2147483647 --- -float(4.1909515877212E-9) ---- testing: 9 / -2147483648 --- -float(-4.1909515857697E-9) ---- testing: 9 / 9223372034707292160 --- -float(9.7578195546415E-19) ---- testing: 9 / -9223372034707292160 --- -float(-9.7578195546415E-19) ---- testing: 9 / 2147483648 --- -float(4.1909515857697E-9) ---- testing: 9 / -2147483649 --- -float(-4.1909515838181E-9) ---- testing: 9 / 4294967294 --- -float(2.0954757938606E-9) ---- testing: 9 / 4294967295 --- -float(2.0954757933727E-9) ---- testing: 9 / 4294967293 --- -float(2.0954757943485E-9) ---- testing: 9 / 9223372036854775806 --- -float(9.7578195523695E-19) ---- testing: 9 / 9.2233720368548E+18 --- -float(9.7578195523695E-19) ---- testing: 9 / -9223372036854775807 --- -float(-9.7578195523695E-19) ---- testing: 9 / -9.2233720368548E+18 --- -float(-9.7578195523695E-19) ---- testing: 65 / 9223372036854775807 --- -float(7.0473141211558E-18) ---- testing: 65 / -9223372036854775808 --- -float(-7.0473141211558E-18) ---- testing: 65 / 2147483647 --- -float(3.0267983689098E-8) ---- testing: 65 / -2147483648 --- -float(-3.0267983675003E-8) ---- testing: 65 / 9223372034707292160 --- -float(7.0473141227966E-18) ---- testing: 65 / -9223372034707292160 --- -float(-7.0473141227966E-18) ---- testing: 65 / 2147483648 --- -float(3.0267983675003E-8) ---- testing: 65 / -2147483649 --- -float(-3.0267983660908E-8) ---- testing: 65 / 4294967294 --- -float(1.5133991844549E-8) ---- testing: 65 / 4294967295 --- -float(1.5133991841025E-8) ---- testing: 65 / 4294967293 --- -float(1.5133991848072E-8) ---- testing: 65 / 9223372036854775806 --- -float(7.0473141211558E-18) ---- testing: 65 / 9.2233720368548E+18 --- -float(7.0473141211558E-18) ---- testing: 65 / -9223372036854775807 --- -float(-7.0473141211558E-18) ---- testing: 65 / -9.2233720368548E+18 --- -float(-7.0473141211558E-18) ---- testing: -44 / 9223372036854775807 --- -float(-4.7704895589362E-18) ---- testing: -44 / -9223372036854775808 --- -float(4.7704895589362E-18) ---- testing: -44 / 2147483647 --- -float(-2.0489096651082E-8) ---- testing: -44 / -2147483648 --- -float(2.0489096641541E-8) ---- testing: -44 / 9223372034707292160 --- -float(-4.7704895600469E-18) ---- testing: -44 / -9223372034707292160 --- -float(4.7704895600469E-18) ---- testing: -44 / 2147483648 --- -float(-2.0489096641541E-8) ---- testing: -44 / -2147483649 --- -float(2.0489096632E-8) ---- testing: -44 / 4294967294 --- -float(-1.0244548325541E-8) ---- testing: -44 / 4294967295 --- -float(-1.0244548323156E-8) ---- testing: -44 / 4294967293 --- -float(-1.0244548327926E-8) ---- testing: -44 / 9223372036854775806 --- -float(-4.7704895589362E-18) ---- testing: -44 / 9.2233720368548E+18 --- -float(-4.7704895589362E-18) ---- testing: -44 / -9223372036854775807 --- -float(4.7704895589362E-18) ---- testing: -44 / -9.2233720368548E+18 --- -float(4.7704895589362E-18) ---- testing: 2147483647 / 9223372036854775807 --- -float(2.3283064354545E-10) ---- testing: 2147483647 / -9223372036854775808 --- -float(-2.3283064354545E-10) ---- testing: 2147483647 / 2147483647 --- -int(1) ---- testing: 2147483647 / -2147483648 --- -float(-0.99999999953434) ---- testing: 2147483647 / 9223372034707292160 --- -float(2.3283064359966E-10) ---- testing: 2147483647 / -9223372034707292160 --- -float(-2.3283064359966E-10) ---- testing: 2147483647 / 2147483648 --- -float(0.99999999953434) ---- testing: 2147483647 / -2147483649 --- -float(-0.99999999906868) ---- testing: 2147483647 / 4294967294 --- -float(0.5) ---- testing: 2147483647 / 4294967295 --- -float(0.49999999988358) ---- testing: 2147483647 / 4294967293 --- -float(0.50000000011642) ---- testing: 2147483647 / 9223372036854775806 --- -float(2.3283064354545E-10) ---- testing: 2147483647 / 9.2233720368548E+18 --- -float(2.3283064354545E-10) ---- testing: 2147483647 / -9223372036854775807 --- -float(-2.3283064354545E-10) ---- testing: 2147483647 / -9.2233720368548E+18 --- -float(-2.3283064354545E-10) ---- testing: 9223372036854775807 / 9223372036854775807 --- -int(1) ---- testing: 9223372036854775807 / -9223372036854775808 --- -float(-1) ---- testing: 9223372036854775807 / 2147483647 --- -float(4294967298) ---- testing: 9223372036854775807 / -2147483648 --- -float(-4294967296) ---- testing: 9223372036854775807 / 9223372034707292160 --- -float(1.0000000002328) ---- testing: 9223372036854775807 / -9223372034707292160 --- -float(-1.0000000002328) ---- testing: 9223372036854775807 / 2147483648 --- -float(4294967296) ---- testing: 9223372036854775807 / -2147483649 --- -float(-4294967294) ---- testing: 9223372036854775807 / 4294967294 --- -float(2147483649) ---- testing: 9223372036854775807 / 4294967295 --- -float(2147483648.5) ---- testing: 9223372036854775807 / 4294967293 --- -float(2147483649.5) ---- testing: 9223372036854775807 / 9223372036854775806 --- -float(1) ---- testing: 9223372036854775807 / 9.2233720368548E+18 --- -float(1) ---- testing: 9223372036854775807 / -9223372036854775807 --- -int(-1) ---- testing: 9223372036854775807 / -9.2233720368548E+18 --- +--- testing: 9223372036854775807 / 0 --- +float(INF) +--- testing: 9223372036854775807 / 1 --- +int(9223372036854775807) +--- testing: 9223372036854775807 / -1 --- +int(-9223372036854775807) +--- testing: 9223372036854775807 / 7 --- +int(1317624576693539401) +--- testing: 9223372036854775807 / 9 --- +float(1.0248191152061E+18) +--- testing: 9223372036854775807 / 65 --- +float(1.4189803133623E+17) +--- testing: 9223372036854775807 / -44 --- +float(-2.096220917467E+17) +--- testing: 9223372036854775807 / 2147483647 --- +float(4294967298) +--- testing: 9223372036854775807 / 9223372036854775807 --- +int(1) +--- testing: -9223372036854775808 / 0 --- +float(-INF) +--- testing: -9223372036854775808 / 1 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 / -1 --- +float(9.2233720368548E+18) +--- testing: -9223372036854775808 / 7 --- +float(-1.3176245766935E+18) +--- testing: -9223372036854775808 / 9 --- +float(-1.0248191152061E+18) +--- testing: -9223372036854775808 / 65 --- +float(-1.4189803133623E+17) +--- testing: -9223372036854775808 / -44 --- +float(2.096220917467E+17) +--- testing: -9223372036854775808 / 2147483647 --- +float(-4294967298) +--- testing: -9223372036854775808 / 9223372036854775807 --- +float(-1) +--- testing: 2147483647 / 0 --- +float(INF) +--- testing: 2147483647 / 1 --- +int(2147483647) +--- testing: 2147483647 / -1 --- +int(-2147483647) +--- testing: 2147483647 / 7 --- +float(306783378.14286) +--- testing: 2147483647 / 9 --- +float(238609294.11111) +--- testing: 2147483647 / 65 --- +float(33038209.953846) +--- testing: 2147483647 / -44 --- +float(-48806446.522727) +--- testing: 2147483647 / 2147483647 --- +int(1) +--- testing: 2147483647 / 9223372036854775807 --- +float(2.3283064354545E-10) +--- testing: -2147483648 / 0 --- +float(-INF) +--- testing: -2147483648 / 1 --- +int(-2147483648) +--- testing: -2147483648 / -1 --- +int(2147483648) +--- testing: -2147483648 / 7 --- +float(-306783378.28571) +--- testing: -2147483648 / 9 --- +float(-238609294.22222) +--- testing: -2147483648 / 65 --- +float(-33038209.969231) +--- testing: -2147483648 / -44 --- +float(48806446.545455) +--- testing: -2147483648 / 2147483647 --- +float(-1.0000000004657) +--- testing: -2147483648 / 9223372036854775807 --- +float(-2.3283064365387E-10) +--- testing: 9223372034707292160 / 0 --- +float(INF) +--- testing: 9223372034707292160 / 1 --- +int(9223372034707292160) +--- testing: 9223372034707292160 / -1 --- +int(-9223372034707292160) +--- testing: 9223372034707292160 / 7 --- +float(1.3176245763868E+18) +--- testing: 9223372034707292160 / 9 --- +float(1.0248191149675E+18) +--- testing: 9223372034707292160 / 65 --- +float(1.4189803130319E+17) +--- testing: 9223372034707292160 / -44 --- +float(-2.0962209169789E+17) +--- testing: 9223372034707292160 / 2147483647 --- +float(4294967297) +--- testing: 9223372034707292160 / 9223372036854775807 --- +float(0.99999999976717) +--- testing: -9223372034707292160 / 0 --- +float(-INF) +--- testing: -9223372034707292160 / 1 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 / -1 --- +int(9223372034707292160) +--- testing: -9223372034707292160 / 7 --- +float(-1.3176245763868E+18) +--- testing: -9223372034707292160 / 9 --- +float(-1.0248191149675E+18) +--- testing: -9223372034707292160 / 65 --- +float(-1.4189803130319E+17) +--- testing: -9223372034707292160 / -44 --- +float(2.0962209169789E+17) +--- testing: -9223372034707292160 / 2147483647 --- +float(-4294967297) +--- testing: -9223372034707292160 / 9223372036854775807 --- +float(-0.99999999976717) +--- testing: 2147483648 / 0 --- +float(INF) +--- testing: 2147483648 / 1 --- +int(2147483648) +--- testing: 2147483648 / -1 --- +int(-2147483648) +--- testing: 2147483648 / 7 --- +float(306783378.28571) +--- testing: 2147483648 / 9 --- +float(238609294.22222) +--- testing: 2147483648 / 65 --- +float(33038209.969231) +--- testing: 2147483648 / -44 --- +float(-48806446.545455) +--- testing: 2147483648 / 2147483647 --- +float(1.0000000004657) +--- testing: 2147483648 / 9223372036854775807 --- +float(2.3283064365387E-10) +--- testing: -2147483649 / 0 --- +float(-INF) +--- testing: -2147483649 / 1 --- +int(-2147483649) +--- testing: -2147483649 / -1 --- +int(2147483649) +--- testing: -2147483649 / 7 --- +float(-306783378.42857) +--- testing: -2147483649 / 9 --- +float(-238609294.33333) +--- testing: -2147483649 / 65 --- +float(-33038209.984615) +--- testing: -2147483649 / -44 --- +float(48806446.568182) +--- testing: -2147483649 / 2147483647 --- +float(-1.0000000009313) +--- testing: -2147483649 / 9223372036854775807 --- +float(-2.3283064376229E-10) +--- testing: 4294967294 / 0 --- +float(INF) +--- testing: 4294967294 / 1 --- +int(4294967294) +--- testing: 4294967294 / -1 --- +int(-4294967294) +--- testing: 4294967294 / 7 --- +float(613566756.28571) +--- testing: 4294967294 / 9 --- +float(477218588.22222) +--- testing: 4294967294 / 65 --- +float(66076419.907692) +--- testing: 4294967294 / -44 --- +float(-97612893.045455) +--- testing: 4294967294 / 2147483647 --- +int(2) +--- testing: 4294967294 / 9223372036854775807 --- +float(4.656612870909E-10) +--- testing: 4294967295 / 0 --- +float(INF) +--- testing: 4294967295 / 1 --- +int(4294967295) +--- testing: 4294967295 / -1 --- +int(-4294967295) +--- testing: 4294967295 / 7 --- +float(613566756.42857) +--- testing: 4294967295 / 9 --- +float(477218588.33333) +--- testing: 4294967295 / 65 --- +float(66076419.923077) +--- testing: 4294967295 / -44 --- +float(-97612893.068182) +--- testing: 4294967295 / 2147483647 --- +float(2.0000000004657) +--- testing: 4294967295 / 9223372036854775807 --- +float(4.6566128719932E-10) +--- testing: 4294967293 / 0 --- +float(INF) +--- testing: 4294967293 / 1 --- +int(4294967293) +--- testing: 4294967293 / -1 --- +int(-4294967293) +--- testing: 4294967293 / 7 --- +float(613566756.14286) +--- testing: 4294967293 / 9 --- +float(477218588.11111) +--- testing: 4294967293 / 65 --- +float(66076419.892308) +--- testing: 4294967293 / -44 --- +float(-97612893.022727) +--- testing: 4294967293 / 2147483647 --- +float(1.9999999995343) +--- testing: 4294967293 / 9223372036854775807 --- +float(4.6566128698248E-10) +--- testing: 9223372036854775806 / 0 --- +float(INF) +--- testing: 9223372036854775806 / 1 --- +int(9223372036854775806) +--- testing: 9223372036854775806 / -1 --- +int(-9223372036854775806) +--- testing: 9223372036854775806 / 7 --- +float(1.3176245766935E+18) +--- testing: 9223372036854775806 / 9 --- +float(1.0248191152061E+18) +--- testing: 9223372036854775806 / 65 --- +float(1.4189803133623E+17) +--- testing: 9223372036854775806 / -44 --- +float(-2.096220917467E+17) +--- testing: 9223372036854775806 / 2147483647 --- +int(4294967298) +--- testing: 9223372036854775806 / 9223372036854775807 --- +float(1) +--- testing: 9.2233720368548E+18 / 0 --- +float(INF) +--- testing: 9.2233720368548E+18 / 1 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 / -1 --- +float(-9.2233720368548E+18) +--- testing: 9.2233720368548E+18 / 7 --- +float(1.3176245766935E+18) +--- testing: 9.2233720368548E+18 / 9 --- +float(1.0248191152061E+18) +--- testing: 9.2233720368548E+18 / 65 --- +float(1.4189803133623E+17) +--- testing: 9.2233720368548E+18 / -44 --- +float(-2.096220917467E+17) +--- testing: 9.2233720368548E+18 / 2147483647 --- +float(4294967298) +--- testing: 9.2233720368548E+18 / 9223372036854775807 --- +float(1) +--- testing: -9223372036854775807 / 0 --- +float(-INF) +--- testing: -9223372036854775807 / 1 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 / -1 --- +int(9223372036854775807) +--- testing: -9223372036854775807 / 7 --- +int(-1317624576693539401) +--- testing: -9223372036854775807 / 9 --- +float(-1.0248191152061E+18) +--- testing: -9223372036854775807 / 65 --- +float(-1.4189803133623E+17) +--- testing: -9223372036854775807 / -44 --- +float(2.096220917467E+17) +--- testing: -9223372036854775807 / 2147483647 --- +float(-4294967298) +--- testing: -9223372036854775807 / 9223372036854775807 --- +int(-1) +--- testing: -9.2233720368548E+18 / 0 --- +float(-INF) +--- testing: -9.2233720368548E+18 / 1 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 / -1 --- +float(9.2233720368548E+18) +--- testing: -9.2233720368548E+18 / 7 --- +float(-1.3176245766935E+18) +--- testing: -9.2233720368548E+18 / 9 --- +float(-1.0248191152061E+18) +--- testing: -9.2233720368548E+18 / 65 --- +float(-1.4189803133623E+17) +--- testing: -9.2233720368548E+18 / -44 --- +float(2.096220917467E+17) +--- testing: -9.2233720368548E+18 / 2147483647 --- +float(-4294967298) +--- testing: -9.2233720368548E+18 / 9223372036854775807 --- +float(-1) +--- testing: 0 / 9223372036854775807 --- +int(0) +--- testing: 0 / -9223372036854775808 --- +int(0) +--- testing: 0 / 2147483647 --- +int(0) +--- testing: 0 / -2147483648 --- +int(0) +--- testing: 0 / 9223372034707292160 --- +int(0) +--- testing: 0 / -9223372034707292160 --- +int(0) +--- testing: 0 / 2147483648 --- +int(0) +--- testing: 0 / -2147483649 --- +int(0) +--- testing: 0 / 4294967294 --- +int(0) +--- testing: 0 / 4294967295 --- +int(0) +--- testing: 0 / 4294967293 --- +int(0) +--- testing: 0 / 9223372036854775806 --- +int(0) +--- testing: 0 / 9.2233720368548E+18 --- +float(0) +--- testing: 0 / -9223372036854775807 --- +int(0) +--- testing: 0 / -9.2233720368548E+18 --- +float(-0) +--- testing: 1 / 9223372036854775807 --- +float(1.0842021724855E-19) +--- testing: 1 / -9223372036854775808 --- +float(-1.0842021724855E-19) +--- testing: 1 / 2147483647 --- +float(4.6566128752458E-10) +--- testing: 1 / -2147483648 --- +float(-4.6566128730774E-10) +--- testing: 1 / 9223372034707292160 --- +float(1.0842021727379E-19) +--- testing: 1 / -9223372034707292160 --- +float(-1.0842021727379E-19) +--- testing: 1 / 2147483648 --- +float(4.6566128730774E-10) +--- testing: 1 / -2147483649 --- +float(-4.656612870909E-10) +--- testing: 1 / 4294967294 --- +float(2.3283064376229E-10) +--- testing: 1 / 4294967295 --- +float(2.3283064370808E-10) +--- testing: 1 / 4294967293 --- +float(2.328306438165E-10) +--- testing: 1 / 9223372036854775806 --- +float(1.0842021724855E-19) +--- testing: 1 / 9.2233720368548E+18 --- +float(1.0842021724855E-19) +--- testing: 1 / -9223372036854775807 --- +float(-1.0842021724855E-19) +--- testing: 1 / -9.2233720368548E+18 --- +float(-1.0842021724855E-19) +--- testing: -1 / 9223372036854775807 --- +float(-1.0842021724855E-19) +--- testing: -1 / -9223372036854775808 --- +float(1.0842021724855E-19) +--- testing: -1 / 2147483647 --- +float(-4.6566128752458E-10) +--- testing: -1 / -2147483648 --- +float(4.6566128730774E-10) +--- testing: -1 / 9223372034707292160 --- +float(-1.0842021727379E-19) +--- testing: -1 / -9223372034707292160 --- +float(1.0842021727379E-19) +--- testing: -1 / 2147483648 --- +float(-4.6566128730774E-10) +--- testing: -1 / -2147483649 --- +float(4.656612870909E-10) +--- testing: -1 / 4294967294 --- +float(-2.3283064376229E-10) +--- testing: -1 / 4294967295 --- +float(-2.3283064370808E-10) +--- testing: -1 / 4294967293 --- +float(-2.328306438165E-10) +--- testing: -1 / 9223372036854775806 --- +float(-1.0842021724855E-19) +--- testing: -1 / 9.2233720368548E+18 --- +float(-1.0842021724855E-19) +--- testing: -1 / -9223372036854775807 --- +float(1.0842021724855E-19) +--- testing: -1 / -9.2233720368548E+18 --- +float(1.0842021724855E-19) +--- testing: 7 / 9223372036854775807 --- +float(7.5894152073985E-19) +--- testing: 7 / -9223372036854775808 --- +float(-7.5894152073985E-19) +--- testing: 7 / 2147483647 --- +float(3.2596290126721E-9) +--- testing: 7 / -2147483648 --- +float(-3.2596290111542E-9) +--- testing: 7 / 9223372034707292160 --- +float(7.5894152091656E-19) +--- testing: 7 / -9223372034707292160 --- +float(-7.5894152091656E-19) +--- testing: 7 / 2147483648 --- +float(3.2596290111542E-9) +--- testing: 7 / -2147483649 --- +float(-3.2596290096363E-9) +--- testing: 7 / 4294967294 --- +float(1.629814506336E-9) +--- testing: 7 / 4294967295 --- +float(1.6298145059566E-9) +--- testing: 7 / 4294967293 --- +float(1.6298145067155E-9) +--- testing: 7 / 9223372036854775806 --- +float(7.5894152073985E-19) +--- testing: 7 / 9.2233720368548E+18 --- +float(7.5894152073985E-19) +--- testing: 7 / -9223372036854775807 --- +float(-7.5894152073985E-19) +--- testing: 7 / -9.2233720368548E+18 --- +float(-7.5894152073985E-19) +--- testing: 9 / 9223372036854775807 --- +float(9.7578195523695E-19) +--- testing: 9 / -9223372036854775808 --- +float(-9.7578195523695E-19) +--- testing: 9 / 2147483647 --- +float(4.1909515877212E-9) +--- testing: 9 / -2147483648 --- +float(-4.1909515857697E-9) +--- testing: 9 / 9223372034707292160 --- +float(9.7578195546415E-19) +--- testing: 9 / -9223372034707292160 --- +float(-9.7578195546415E-19) +--- testing: 9 / 2147483648 --- +float(4.1909515857697E-9) +--- testing: 9 / -2147483649 --- +float(-4.1909515838181E-9) +--- testing: 9 / 4294967294 --- +float(2.0954757938606E-9) +--- testing: 9 / 4294967295 --- +float(2.0954757933727E-9) +--- testing: 9 / 4294967293 --- +float(2.0954757943485E-9) +--- testing: 9 / 9223372036854775806 --- +float(9.7578195523695E-19) +--- testing: 9 / 9.2233720368548E+18 --- +float(9.7578195523695E-19) +--- testing: 9 / -9223372036854775807 --- +float(-9.7578195523695E-19) +--- testing: 9 / -9.2233720368548E+18 --- +float(-9.7578195523695E-19) +--- testing: 65 / 9223372036854775807 --- +float(7.0473141211558E-18) +--- testing: 65 / -9223372036854775808 --- +float(-7.0473141211558E-18) +--- testing: 65 / 2147483647 --- +float(3.0267983689098E-8) +--- testing: 65 / -2147483648 --- +float(-3.0267983675003E-8) +--- testing: 65 / 9223372034707292160 --- +float(7.0473141227966E-18) +--- testing: 65 / -9223372034707292160 --- +float(-7.0473141227966E-18) +--- testing: 65 / 2147483648 --- +float(3.0267983675003E-8) +--- testing: 65 / -2147483649 --- +float(-3.0267983660908E-8) +--- testing: 65 / 4294967294 --- +float(1.5133991844549E-8) +--- testing: 65 / 4294967295 --- +float(1.5133991841025E-8) +--- testing: 65 / 4294967293 --- +float(1.5133991848072E-8) +--- testing: 65 / 9223372036854775806 --- +float(7.0473141211558E-18) +--- testing: 65 / 9.2233720368548E+18 --- +float(7.0473141211558E-18) +--- testing: 65 / -9223372036854775807 --- +float(-7.0473141211558E-18) +--- testing: 65 / -9.2233720368548E+18 --- +float(-7.0473141211558E-18) +--- testing: -44 / 9223372036854775807 --- +float(-4.7704895589362E-18) +--- testing: -44 / -9223372036854775808 --- +float(4.7704895589362E-18) +--- testing: -44 / 2147483647 --- +float(-2.0489096651082E-8) +--- testing: -44 / -2147483648 --- +float(2.0489096641541E-8) +--- testing: -44 / 9223372034707292160 --- +float(-4.7704895600469E-18) +--- testing: -44 / -9223372034707292160 --- +float(4.7704895600469E-18) +--- testing: -44 / 2147483648 --- +float(-2.0489096641541E-8) +--- testing: -44 / -2147483649 --- +float(2.0489096632E-8) +--- testing: -44 / 4294967294 --- +float(-1.0244548325541E-8) +--- testing: -44 / 4294967295 --- +float(-1.0244548323156E-8) +--- testing: -44 / 4294967293 --- +float(-1.0244548327926E-8) +--- testing: -44 / 9223372036854775806 --- +float(-4.7704895589362E-18) +--- testing: -44 / 9.2233720368548E+18 --- +float(-4.7704895589362E-18) +--- testing: -44 / -9223372036854775807 --- +float(4.7704895589362E-18) +--- testing: -44 / -9.2233720368548E+18 --- +float(4.7704895589362E-18) +--- testing: 2147483647 / 9223372036854775807 --- +float(2.3283064354545E-10) +--- testing: 2147483647 / -9223372036854775808 --- +float(-2.3283064354545E-10) +--- testing: 2147483647 / 2147483647 --- +int(1) +--- testing: 2147483647 / -2147483648 --- +float(-0.99999999953434) +--- testing: 2147483647 / 9223372034707292160 --- +float(2.3283064359966E-10) +--- testing: 2147483647 / -9223372034707292160 --- +float(-2.3283064359966E-10) +--- testing: 2147483647 / 2147483648 --- +float(0.99999999953434) +--- testing: 2147483647 / -2147483649 --- +float(-0.99999999906868) +--- testing: 2147483647 / 4294967294 --- +float(0.5) +--- testing: 2147483647 / 4294967295 --- +float(0.49999999988358) +--- testing: 2147483647 / 4294967293 --- +float(0.50000000011642) +--- testing: 2147483647 / 9223372036854775806 --- +float(2.3283064354545E-10) +--- testing: 2147483647 / 9.2233720368548E+18 --- +float(2.3283064354545E-10) +--- testing: 2147483647 / -9223372036854775807 --- +float(-2.3283064354545E-10) +--- testing: 2147483647 / -9.2233720368548E+18 --- +float(-2.3283064354545E-10) +--- testing: 9223372036854775807 / 9223372036854775807 --- +int(1) +--- testing: 9223372036854775807 / -9223372036854775808 --- +float(-1) +--- testing: 9223372036854775807 / 2147483647 --- +float(4294967298) +--- testing: 9223372036854775807 / -2147483648 --- +float(-4294967296) +--- testing: 9223372036854775807 / 9223372034707292160 --- +float(1.0000000002328) +--- testing: 9223372036854775807 / -9223372034707292160 --- +float(-1.0000000002328) +--- testing: 9223372036854775807 / 2147483648 --- +float(4294967296) +--- testing: 9223372036854775807 / -2147483649 --- +float(-4294967294) +--- testing: 9223372036854775807 / 4294967294 --- +float(2147483649) +--- testing: 9223372036854775807 / 4294967295 --- +float(2147483648.5) +--- testing: 9223372036854775807 / 4294967293 --- +float(2147483649.5) +--- testing: 9223372036854775807 / 9223372036854775806 --- +float(1) +--- testing: 9223372036854775807 / 9.2233720368548E+18 --- +float(1) +--- testing: 9223372036854775807 / -9223372036854775807 --- +int(-1) +--- testing: 9223372036854775807 / -9.2233720368548E+18 --- float(-1) ===DONE=== diff --git a/tests/lang/operators/divide_variationStr.phpt b/tests/lang/operators/divide_variationStr.phpt index 2a1a2e875b9..f54013fcece 100644 --- a/tests/lang/operators/divide_variationStr.phpt +++ b/tests/lang/operators/divide_variationStr.phpt @@ -3,9 +3,14 @@ Test / operator : various numbers as strings --FILE-- ===DONE=== --EXPECT-- ---- testing: '0' / '65' --- -int(0) ---- testing: '0' / '-44' --- -int(0) ---- testing: '0' / '1.2' --- -float(0) ---- testing: '0' / '-7.7' --- -float(-0) ---- testing: '0' / '123abc' --- -int(0) ---- testing: '0' / '123e5' --- -float(0) ---- testing: '0' / '123e5xyz' --- -float(0) ---- testing: '0' / ' 123abc' --- -int(0) ---- testing: '0' / '123 abc' --- -int(0) ---- testing: '0' / '123abc ' --- -int(0) ---- testing: '0' / '3.4a' --- -float(0) ---- testing: 'abc' / '65' --- -int(0) ---- testing: 'abc' / '-44' --- -int(0) ---- testing: 'abc' / '1.2' --- -float(0) ---- testing: 'abc' / '-7.7' --- -float(-0) ---- testing: 'abc' / '123abc' --- -int(0) ---- testing: 'abc' / '123e5' --- -float(0) ---- testing: 'abc' / '123e5xyz' --- -float(0) ---- testing: 'abc' / ' 123abc' --- -int(0) ---- testing: 'abc' / '123 abc' --- -int(0) ---- testing: 'abc' / '123abc ' --- -int(0) ---- testing: 'abc' / '3.4a' --- -float(0) ---- testing: '65' / '65' --- -int(1) ---- testing: '65' / '-44' --- -float(-1.4772727272727) ---- testing: '65' / '1.2' --- -float(54.166666666667) ---- testing: '65' / '-7.7' --- -float(-8.4415584415584) ---- testing: '65' / '123abc' --- -float(0.52845528455285) ---- testing: '65' / '123e5' --- -float(5.2845528455285E-6) ---- testing: '65' / '123e5xyz' --- -float(5.2845528455285E-6) ---- testing: '65' / ' 123abc' --- -float(0.52845528455285) ---- testing: '65' / '123 abc' --- -float(0.52845528455285) ---- testing: '65' / '123abc ' --- -float(0.52845528455285) ---- testing: '65' / '3.4a' --- -float(19.117647058824) ---- testing: '-44' / '65' --- -float(-0.67692307692308) ---- testing: '-44' / '-44' --- -int(1) ---- testing: '-44' / '1.2' --- -float(-36.666666666667) ---- testing: '-44' / '-7.7' --- -float(5.7142857142857) ---- testing: '-44' / '123abc' --- -float(-0.35772357723577) ---- testing: '-44' / '123e5' --- -float(-3.5772357723577E-6) ---- testing: '-44' / '123e5xyz' --- -float(-3.5772357723577E-6) ---- testing: '-44' / ' 123abc' --- -float(-0.35772357723577) ---- testing: '-44' / '123 abc' --- -float(-0.35772357723577) ---- testing: '-44' / '123abc ' --- -float(-0.35772357723577) ---- testing: '-44' / '3.4a' --- -float(-12.941176470588) ---- testing: '1.2' / '65' --- -float(0.018461538461538) ---- testing: '1.2' / '-44' --- -float(-0.027272727272727) ---- testing: '1.2' / '1.2' --- -float(1) ---- testing: '1.2' / '-7.7' --- -float(-0.15584415584416) ---- testing: '1.2' / '123abc' --- -float(0.0097560975609756) ---- testing: '1.2' / '123e5' --- -float(9.7560975609756E-8) ---- testing: '1.2' / '123e5xyz' --- -float(9.7560975609756E-8) ---- testing: '1.2' / ' 123abc' --- -float(0.0097560975609756) ---- testing: '1.2' / '123 abc' --- -float(0.0097560975609756) ---- testing: '1.2' / '123abc ' --- -float(0.0097560975609756) ---- testing: '1.2' / '3.4a' --- -float(0.35294117647059) ---- testing: '-7.7' / '65' --- -float(-0.11846153846154) ---- testing: '-7.7' / '-44' --- -float(0.175) ---- testing: '-7.7' / '1.2' --- -float(-6.4166666666667) ---- testing: '-7.7' / '-7.7' --- -float(1) ---- testing: '-7.7' / '123abc' --- -float(-0.06260162601626) ---- testing: '-7.7' / '123e5' --- -float(-6.260162601626E-7) ---- testing: '-7.7' / '123e5xyz' --- -float(-6.260162601626E-7) ---- testing: '-7.7' / ' 123abc' --- -float(-0.06260162601626) ---- testing: '-7.7' / '123 abc' --- -float(-0.06260162601626) ---- testing: '-7.7' / '123abc ' --- -float(-0.06260162601626) ---- testing: '-7.7' / '3.4a' --- -float(-2.2647058823529) ---- testing: '123abc' / '65' --- -float(1.8923076923077) ---- testing: '123abc' / '-44' --- -float(-2.7954545454545) ---- testing: '123abc' / '1.2' --- -float(102.5) ---- testing: '123abc' / '-7.7' --- -float(-15.974025974026) ---- testing: '123abc' / '123abc' --- -int(1) ---- testing: '123abc' / '123e5' --- -float(1.0E-5) ---- testing: '123abc' / '123e5xyz' --- -float(1.0E-5) ---- testing: '123abc' / ' 123abc' --- -int(1) ---- testing: '123abc' / '123 abc' --- -int(1) ---- testing: '123abc' / '123abc ' --- -int(1) ---- testing: '123abc' / '3.4a' --- -float(36.176470588235) ---- testing: '123e5' / '65' --- -float(189230.76923077) ---- testing: '123e5' / '-44' --- -float(-279545.45454545) ---- testing: '123e5' / '1.2' --- -float(10250000) ---- testing: '123e5' / '-7.7' --- -float(-1597402.5974026) ---- testing: '123e5' / '123abc' --- -float(100000) ---- testing: '123e5' / '123e5' --- -float(1) ---- testing: '123e5' / '123e5xyz' --- -float(1) ---- testing: '123e5' / ' 123abc' --- -float(100000) ---- testing: '123e5' / '123 abc' --- -float(100000) ---- testing: '123e5' / '123abc ' --- -float(100000) ---- testing: '123e5' / '3.4a' --- -float(3617647.0588235) ---- testing: '123e5xyz' / '65' --- -float(189230.76923077) ---- testing: '123e5xyz' / '-44' --- -float(-279545.45454545) ---- testing: '123e5xyz' / '1.2' --- -float(10250000) ---- testing: '123e5xyz' / '-7.7' --- -float(-1597402.5974026) ---- testing: '123e5xyz' / '123abc' --- -float(100000) ---- testing: '123e5xyz' / '123e5' --- -float(1) ---- testing: '123e5xyz' / '123e5xyz' --- -float(1) ---- testing: '123e5xyz' / ' 123abc' --- -float(100000) ---- testing: '123e5xyz' / '123 abc' --- -float(100000) ---- testing: '123e5xyz' / '123abc ' --- -float(100000) ---- testing: '123e5xyz' / '3.4a' --- -float(3617647.0588235) ---- testing: ' 123abc' / '65' --- -float(1.8923076923077) ---- testing: ' 123abc' / '-44' --- -float(-2.7954545454545) ---- testing: ' 123abc' / '1.2' --- -float(102.5) ---- testing: ' 123abc' / '-7.7' --- -float(-15.974025974026) ---- testing: ' 123abc' / '123abc' --- -int(1) ---- testing: ' 123abc' / '123e5' --- -float(1.0E-5) ---- testing: ' 123abc' / '123e5xyz' --- -float(1.0E-5) ---- testing: ' 123abc' / ' 123abc' --- -int(1) ---- testing: ' 123abc' / '123 abc' --- -int(1) ---- testing: ' 123abc' / '123abc ' --- -int(1) ---- testing: ' 123abc' / '3.4a' --- -float(36.176470588235) ---- testing: '123 abc' / '65' --- -float(1.8923076923077) ---- testing: '123 abc' / '-44' --- -float(-2.7954545454545) ---- testing: '123 abc' / '1.2' --- -float(102.5) ---- testing: '123 abc' / '-7.7' --- -float(-15.974025974026) ---- testing: '123 abc' / '123abc' --- -int(1) ---- testing: '123 abc' / '123e5' --- -float(1.0E-5) ---- testing: '123 abc' / '123e5xyz' --- -float(1.0E-5) ---- testing: '123 abc' / ' 123abc' --- -int(1) ---- testing: '123 abc' / '123 abc' --- -int(1) ---- testing: '123 abc' / '123abc ' --- -int(1) ---- testing: '123 abc' / '3.4a' --- -float(36.176470588235) ---- testing: '123abc ' / '65' --- -float(1.8923076923077) ---- testing: '123abc ' / '-44' --- -float(-2.7954545454545) ---- testing: '123abc ' / '1.2' --- -float(102.5) ---- testing: '123abc ' / '-7.7' --- -float(-15.974025974026) ---- testing: '123abc ' / '123abc' --- -int(1) ---- testing: '123abc ' / '123e5' --- -float(1.0E-5) ---- testing: '123abc ' / '123e5xyz' --- -float(1.0E-5) ---- testing: '123abc ' / ' 123abc' --- -int(1) ---- testing: '123abc ' / '123 abc' --- -int(1) ---- testing: '123abc ' / '123abc ' --- -int(1) ---- testing: '123abc ' / '3.4a' --- -float(36.176470588235) ---- testing: '3.4a' / '65' --- -float(0.052307692307692) ---- testing: '3.4a' / '-44' --- -float(-0.077272727272727) ---- testing: '3.4a' / '1.2' --- -float(2.8333333333333) ---- testing: '3.4a' / '-7.7' --- -float(-0.44155844155844) ---- testing: '3.4a' / '123abc' --- -float(0.027642276422764) ---- testing: '3.4a' / '123e5' --- -float(2.7642276422764E-7) ---- testing: '3.4a' / '123e5xyz' --- -float(2.7642276422764E-7) ---- testing: '3.4a' / ' 123abc' --- -float(0.027642276422764) ---- testing: '3.4a' / '123 abc' --- -float(0.027642276422764) ---- testing: '3.4a' / '123abc ' --- -float(0.027642276422764) ---- testing: '3.4a' / '3.4a' --- -float(1) +--- testing: '0' / '0' --- +float(NAN) +--- testing: '0' / '65' --- +int(0) +--- testing: '0' / '-44' --- +int(0) +--- testing: '0' / '1.2' --- +float(0) +--- testing: '0' / '-7.7' --- +float(-0) +--- testing: '0' / 'abc' --- +float(NAN) +--- testing: '0' / '123abc' --- +int(0) +--- testing: '0' / '123e5' --- +float(0) +--- testing: '0' / '123e5xyz' --- +float(0) +--- testing: '0' / ' 123abc' --- +int(0) +--- testing: '0' / '123 abc' --- +int(0) +--- testing: '0' / '123abc ' --- +int(0) +--- testing: '0' / '3.4a' --- +float(0) +--- testing: '0' / 'a5.9' --- +float(NAN) +--- testing: '65' / '0' --- +float(INF) +--- testing: '65' / '65' --- +int(1) +--- testing: '65' / '-44' --- +float(-1.4772727272727) +--- testing: '65' / '1.2' --- +float(54.166666666667) +--- testing: '65' / '-7.7' --- +float(-8.4415584415584) +--- testing: '65' / 'abc' --- +float(INF) +--- testing: '65' / '123abc' --- +float(0.52845528455285) +--- testing: '65' / '123e5' --- +float(5.2845528455285E-6) +--- testing: '65' / '123e5xyz' --- +float(5.2845528455285E-6) +--- testing: '65' / ' 123abc' --- +float(0.52845528455285) +--- testing: '65' / '123 abc' --- +float(0.52845528455285) +--- testing: '65' / '123abc ' --- +float(0.52845528455285) +--- testing: '65' / '3.4a' --- +float(19.117647058824) +--- testing: '65' / 'a5.9' --- +float(INF) +--- testing: '-44' / '0' --- +float(-INF) +--- testing: '-44' / '65' --- +float(-0.67692307692308) +--- testing: '-44' / '-44' --- +int(1) +--- testing: '-44' / '1.2' --- +float(-36.666666666667) +--- testing: '-44' / '-7.7' --- +float(5.7142857142857) +--- testing: '-44' / 'abc' --- +float(-INF) +--- testing: '-44' / '123abc' --- +float(-0.35772357723577) +--- testing: '-44' / '123e5' --- +float(-3.5772357723577E-6) +--- testing: '-44' / '123e5xyz' --- +float(-3.5772357723577E-6) +--- testing: '-44' / ' 123abc' --- +float(-0.35772357723577) +--- testing: '-44' / '123 abc' --- +float(-0.35772357723577) +--- testing: '-44' / '123abc ' --- +float(-0.35772357723577) +--- testing: '-44' / '3.4a' --- +float(-12.941176470588) +--- testing: '-44' / 'a5.9' --- +float(-INF) +--- testing: '1.2' / '0' --- +float(INF) +--- testing: '1.2' / '65' --- +float(0.018461538461538) +--- testing: '1.2' / '-44' --- +float(-0.027272727272727) +--- testing: '1.2' / '1.2' --- +float(1) +--- testing: '1.2' / '-7.7' --- +float(-0.15584415584416) +--- testing: '1.2' / 'abc' --- +float(INF) +--- testing: '1.2' / '123abc' --- +float(0.0097560975609756) +--- testing: '1.2' / '123e5' --- +float(9.7560975609756E-8) +--- testing: '1.2' / '123e5xyz' --- +float(9.7560975609756E-8) +--- testing: '1.2' / ' 123abc' --- +float(0.0097560975609756) +--- testing: '1.2' / '123 abc' --- +float(0.0097560975609756) +--- testing: '1.2' / '123abc ' --- +float(0.0097560975609756) +--- testing: '1.2' / '3.4a' --- +float(0.35294117647059) +--- testing: '1.2' / 'a5.9' --- +float(INF) +--- testing: '-7.7' / '0' --- +float(-INF) +--- testing: '-7.7' / '65' --- +float(-0.11846153846154) +--- testing: '-7.7' / '-44' --- +float(0.175) +--- testing: '-7.7' / '1.2' --- +float(-6.4166666666667) +--- testing: '-7.7' / '-7.7' --- +float(1) +--- testing: '-7.7' / 'abc' --- +float(-INF) +--- testing: '-7.7' / '123abc' --- +float(-0.06260162601626) +--- testing: '-7.7' / '123e5' --- +float(-6.260162601626E-7) +--- testing: '-7.7' / '123e5xyz' --- +float(-6.260162601626E-7) +--- testing: '-7.7' / ' 123abc' --- +float(-0.06260162601626) +--- testing: '-7.7' / '123 abc' --- +float(-0.06260162601626) +--- testing: '-7.7' / '123abc ' --- +float(-0.06260162601626) +--- testing: '-7.7' / '3.4a' --- +float(-2.2647058823529) +--- testing: '-7.7' / 'a5.9' --- +float(-INF) +--- testing: 'abc' / '0' --- +float(NAN) +--- testing: 'abc' / '65' --- +int(0) +--- testing: 'abc' / '-44' --- +int(0) +--- testing: 'abc' / '1.2' --- +float(0) +--- testing: 'abc' / '-7.7' --- +float(-0) +--- testing: 'abc' / 'abc' --- +float(NAN) +--- testing: 'abc' / '123abc' --- +int(0) +--- testing: 'abc' / '123e5' --- +float(0) +--- testing: 'abc' / '123e5xyz' --- +float(0) +--- testing: 'abc' / ' 123abc' --- +int(0) +--- testing: 'abc' / '123 abc' --- +int(0) +--- testing: 'abc' / '123abc ' --- +int(0) +--- testing: 'abc' / '3.4a' --- +float(0) +--- testing: 'abc' / 'a5.9' --- +float(NAN) +--- testing: '123abc' / '0' --- +float(INF) +--- testing: '123abc' / '65' --- +float(1.8923076923077) +--- testing: '123abc' / '-44' --- +float(-2.7954545454545) +--- testing: '123abc' / '1.2' --- +float(102.5) +--- testing: '123abc' / '-7.7' --- +float(-15.974025974026) +--- testing: '123abc' / 'abc' --- +float(INF) +--- testing: '123abc' / '123abc' --- +int(1) +--- testing: '123abc' / '123e5' --- +float(1.0E-5) +--- testing: '123abc' / '123e5xyz' --- +float(1.0E-5) +--- testing: '123abc' / ' 123abc' --- +int(1) +--- testing: '123abc' / '123 abc' --- +int(1) +--- testing: '123abc' / '123abc ' --- +int(1) +--- testing: '123abc' / '3.4a' --- +float(36.176470588235) +--- testing: '123abc' / 'a5.9' --- +float(INF) +--- testing: '123e5' / '0' --- +float(INF) +--- testing: '123e5' / '65' --- +float(189230.76923077) +--- testing: '123e5' / '-44' --- +float(-279545.45454545) +--- testing: '123e5' / '1.2' --- +float(10250000) +--- testing: '123e5' / '-7.7' --- +float(-1597402.5974026) +--- testing: '123e5' / 'abc' --- +float(INF) +--- testing: '123e5' / '123abc' --- +float(100000) +--- testing: '123e5' / '123e5' --- +float(1) +--- testing: '123e5' / '123e5xyz' --- +float(1) +--- testing: '123e5' / ' 123abc' --- +float(100000) +--- testing: '123e5' / '123 abc' --- +float(100000) +--- testing: '123e5' / '123abc ' --- +float(100000) +--- testing: '123e5' / '3.4a' --- +float(3617647.0588235) +--- testing: '123e5' / 'a5.9' --- +float(INF) +--- testing: '123e5xyz' / '0' --- +float(INF) +--- testing: '123e5xyz' / '65' --- +float(189230.76923077) +--- testing: '123e5xyz' / '-44' --- +float(-279545.45454545) +--- testing: '123e5xyz' / '1.2' --- +float(10250000) +--- testing: '123e5xyz' / '-7.7' --- +float(-1597402.5974026) +--- testing: '123e5xyz' / 'abc' --- +float(INF) +--- testing: '123e5xyz' / '123abc' --- +float(100000) +--- testing: '123e5xyz' / '123e5' --- +float(1) +--- testing: '123e5xyz' / '123e5xyz' --- +float(1) +--- testing: '123e5xyz' / ' 123abc' --- +float(100000) +--- testing: '123e5xyz' / '123 abc' --- +float(100000) +--- testing: '123e5xyz' / '123abc ' --- +float(100000) +--- testing: '123e5xyz' / '3.4a' --- +float(3617647.0588235) +--- testing: '123e5xyz' / 'a5.9' --- +float(INF) +--- testing: ' 123abc' / '0' --- +float(INF) +--- testing: ' 123abc' / '65' --- +float(1.8923076923077) +--- testing: ' 123abc' / '-44' --- +float(-2.7954545454545) +--- testing: ' 123abc' / '1.2' --- +float(102.5) +--- testing: ' 123abc' / '-7.7' --- +float(-15.974025974026) +--- testing: ' 123abc' / 'abc' --- +float(INF) +--- testing: ' 123abc' / '123abc' --- +int(1) +--- testing: ' 123abc' / '123e5' --- +float(1.0E-5) +--- testing: ' 123abc' / '123e5xyz' --- +float(1.0E-5) +--- testing: ' 123abc' / ' 123abc' --- +int(1) +--- testing: ' 123abc' / '123 abc' --- +int(1) +--- testing: ' 123abc' / '123abc ' --- +int(1) +--- testing: ' 123abc' / '3.4a' --- +float(36.176470588235) +--- testing: ' 123abc' / 'a5.9' --- +float(INF) +--- testing: '123 abc' / '0' --- +float(INF) +--- testing: '123 abc' / '65' --- +float(1.8923076923077) +--- testing: '123 abc' / '-44' --- +float(-2.7954545454545) +--- testing: '123 abc' / '1.2' --- +float(102.5) +--- testing: '123 abc' / '-7.7' --- +float(-15.974025974026) +--- testing: '123 abc' / 'abc' --- +float(INF) +--- testing: '123 abc' / '123abc' --- +int(1) +--- testing: '123 abc' / '123e5' --- +float(1.0E-5) +--- testing: '123 abc' / '123e5xyz' --- +float(1.0E-5) +--- testing: '123 abc' / ' 123abc' --- +int(1) +--- testing: '123 abc' / '123 abc' --- +int(1) +--- testing: '123 abc' / '123abc ' --- +int(1) +--- testing: '123 abc' / '3.4a' --- +float(36.176470588235) +--- testing: '123 abc' / 'a5.9' --- +float(INF) +--- testing: '123abc ' / '0' --- +float(INF) +--- testing: '123abc ' / '65' --- +float(1.8923076923077) +--- testing: '123abc ' / '-44' --- +float(-2.7954545454545) +--- testing: '123abc ' / '1.2' --- +float(102.5) +--- testing: '123abc ' / '-7.7' --- +float(-15.974025974026) +--- testing: '123abc ' / 'abc' --- +float(INF) +--- testing: '123abc ' / '123abc' --- +int(1) +--- testing: '123abc ' / '123e5' --- +float(1.0E-5) +--- testing: '123abc ' / '123e5xyz' --- +float(1.0E-5) +--- testing: '123abc ' / ' 123abc' --- +int(1) +--- testing: '123abc ' / '123 abc' --- +int(1) +--- testing: '123abc ' / '123abc ' --- +int(1) +--- testing: '123abc ' / '3.4a' --- +float(36.176470588235) +--- testing: '123abc ' / 'a5.9' --- +float(INF) +--- testing: '3.4a' / '0' --- +float(INF) +--- testing: '3.4a' / '65' --- +float(0.052307692307692) +--- testing: '3.4a' / '-44' --- +float(-0.077272727272727) +--- testing: '3.4a' / '1.2' --- +float(2.8333333333333) +--- testing: '3.4a' / '-7.7' --- +float(-0.44155844155844) +--- testing: '3.4a' / 'abc' --- +float(INF) +--- testing: '3.4a' / '123abc' --- +float(0.027642276422764) +--- testing: '3.4a' / '123e5' --- +float(2.7642276422764E-7) +--- testing: '3.4a' / '123e5xyz' --- +float(2.7642276422764E-7) +--- testing: '3.4a' / ' 123abc' --- +float(0.027642276422764) +--- testing: '3.4a' / '123 abc' --- +float(0.027642276422764) +--- testing: '3.4a' / '123abc ' --- +float(0.027642276422764) +--- testing: '3.4a' / '3.4a' --- +float(1) +--- testing: '3.4a' / 'a5.9' --- +float(INF) +--- testing: 'a5.9' / '0' --- +float(NAN) +--- testing: 'a5.9' / '65' --- +int(0) +--- testing: 'a5.9' / '-44' --- +int(0) +--- testing: 'a5.9' / '1.2' --- +float(0) +--- testing: 'a5.9' / '-7.7' --- +float(-0) +--- testing: 'a5.9' / 'abc' --- +float(NAN) +--- testing: 'a5.9' / '123abc' --- +int(0) +--- testing: 'a5.9' / '123e5' --- +float(0) +--- testing: 'a5.9' / '123e5xyz' --- +float(0) +--- testing: 'a5.9' / ' 123abc' --- +int(0) +--- testing: 'a5.9' / '123 abc' --- +int(0) +--- testing: 'a5.9' / '123abc ' --- +int(0) +--- testing: 'a5.9' / '3.4a' --- +float(0) +--- testing: 'a5.9' / 'a5.9' --- +float(NAN) ===DONE=== diff --git a/tests/lang/operators/modulus_basiclong_64bit.phpt b/tests/lang/operators/modulus_basiclong_64bit.phpt index 4411a37f2b1..3fef77d85cc 100644 --- a/tests/lang/operators/modulus_basiclong_64bit.phpt +++ b/tests/lang/operators/modulus_basiclong_64bit.phpt @@ -18,7 +18,9 @@ $longVals = array( MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1 ); -$otherVals = array(1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit); +$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit); + +error_reporting(E_ERROR); foreach ($longVals as $longVal) { foreach($otherVals as $otherVal) { @@ -31,7 +33,7 @@ foreach ($longVals as $longVal) { } } -foreach (array_merge([0], $otherVals) as $otherVal) { +foreach ($otherVals as $otherVal) { foreach($longVals as $longVal) { echo "--- testing: $otherVal % $longVal ---\n"; try { @@ -45,6 +47,8 @@ foreach (array_merge([0], $otherVals) as $otherVal) { ?> ===DONE=== --EXPECT-- +--- testing: 9223372036854775807 % 0 --- +Exception: Division by zero --- testing: 9223372036854775807 % 1 --- int(0) --- testing: 9223372036854775807 % -1 --- @@ -61,6 +65,8 @@ int(7) int(1) --- testing: 9223372036854775807 % 9223372036854775807 --- int(0) +--- testing: -9223372036854775808 % 0 --- +Exception: Division by zero --- testing: -9223372036854775808 % 1 --- int(0) --- testing: -9223372036854775808 % -1 --- @@ -77,6 +83,8 @@ int(-8) int(-2) --- testing: -9223372036854775808 % 9223372036854775807 --- int(-1) +--- testing: 2147483647 % 0 --- +Exception: Division by zero --- testing: 2147483647 % 1 --- int(0) --- testing: 2147483647 % -1 --- @@ -93,6 +101,8 @@ int(23) int(0) --- testing: 2147483647 % 9223372036854775807 --- int(2147483647) +--- testing: -2147483648 % 0 --- +Exception: Division by zero --- testing: -2147483648 % 1 --- int(0) --- testing: -2147483648 % -1 --- @@ -109,6 +119,8 @@ int(-24) int(-1) --- testing: -2147483648 % 9223372036854775807 --- int(-2147483648) +--- testing: 9223372034707292160 % 0 --- +Exception: Division by zero --- testing: 9223372034707292160 % 1 --- int(0) --- testing: 9223372034707292160 % -1 --- @@ -125,6 +137,8 @@ int(28) int(1) --- testing: 9223372034707292160 % 9223372036854775807 --- int(9223372034707292160) +--- testing: -9223372034707292160 % 0 --- +Exception: Division by zero --- testing: -9223372034707292160 % 1 --- int(0) --- testing: -9223372034707292160 % -1 --- @@ -141,6 +155,8 @@ int(-28) int(-1) --- testing: -9223372034707292160 % 9223372036854775807 --- int(-9223372034707292160) +--- testing: 2147483648 % 0 --- +Exception: Division by zero --- testing: 2147483648 % 1 --- int(0) --- testing: 2147483648 % -1 --- @@ -157,6 +173,8 @@ int(24) int(1) --- testing: 2147483648 % 9223372036854775807 --- int(2147483648) +--- testing: -2147483649 % 0 --- +Exception: Division by zero --- testing: -2147483649 % 1 --- int(0) --- testing: -2147483649 % -1 --- @@ -173,6 +191,8 @@ int(-25) int(-2) --- testing: -2147483649 % 9223372036854775807 --- int(-2147483649) +--- testing: 4294967294 % 0 --- +Exception: Division by zero --- testing: 4294967294 % 1 --- int(0) --- testing: 4294967294 % -1 --- @@ -189,6 +209,8 @@ int(2) int(0) --- testing: 4294967294 % 9223372036854775807 --- int(4294967294) +--- testing: 4294967295 % 0 --- +Exception: Division by zero --- testing: 4294967295 % 1 --- int(0) --- testing: 4294967295 % -1 --- @@ -205,6 +227,8 @@ int(3) int(1) --- testing: 4294967295 % 9223372036854775807 --- int(4294967295) +--- testing: 4294967293 % 0 --- +Exception: Division by zero --- testing: 4294967293 % 1 --- int(0) --- testing: 4294967293 % -1 --- @@ -221,6 +245,8 @@ int(1) int(2147483646) --- testing: 4294967293 % 9223372036854775807 --- int(4294967293) +--- testing: 9223372036854775806 % 0 --- +Exception: Division by zero --- testing: 9223372036854775806 % 1 --- int(0) --- testing: 9223372036854775806 % -1 --- @@ -237,6 +263,8 @@ int(6) int(0) --- testing: 9223372036854775806 % 9223372036854775807 --- int(9223372036854775806) +--- testing: 9.2233720368548E+18 % 0 --- +Exception: Division by zero --- testing: 9.2233720368548E+18 % 1 --- int(0) --- testing: 9.2233720368548E+18 % -1 --- @@ -253,6 +281,8 @@ int(-8) int(-2) --- testing: 9.2233720368548E+18 % 9223372036854775807 --- int(-1) +--- testing: -9223372036854775807 % 0 --- +Exception: Division by zero --- testing: -9223372036854775807 % 1 --- int(0) --- testing: -9223372036854775807 % -1 --- @@ -269,6 +299,8 @@ int(-7) int(-1) --- testing: -9223372036854775807 % 9223372036854775807 --- int(0) +--- testing: -9.2233720368548E+18 % 0 --- +Exception: Division by zero --- testing: -9.2233720368548E+18 % 1 --- int(0) --- testing: -9.2233720368548E+18 % -1 --- diff --git a/tests/lang/operators/modulus_variationStr.phpt b/tests/lang/operators/modulus_variationStr.phpt index c1d0e644595..24312b56112 100644 --- a/tests/lang/operators/modulus_variationStr.phpt +++ b/tests/lang/operators/modulus_variationStr.phpt @@ -3,11 +3,14 @@ Test % operator : various numbers as strings --FILE-- ===DONE=== --EXPECT-- ---- testing: '0' % '65' --- -int(0) ---- testing: '0' % '-44' --- -int(0) ---- testing: '0' % '1.2' --- -int(0) ---- testing: '0' % '-7.7' --- -int(0) ---- testing: '0' % '123abc' --- -int(0) ---- testing: '0' % '123e5' --- -int(0) ---- testing: '0' % '123e5xyz' --- -int(0) ---- testing: '0' % ' 123abc' --- -int(0) ---- testing: '0' % '123 abc' --- -int(0) ---- testing: '0' % '123abc ' --- -int(0) ---- testing: '0' % '3.4a' --- -int(0) ---- testing: 'abc' % '65' --- -int(0) ---- testing: 'abc' % '-44' --- -int(0) ---- testing: 'abc' % '1.2' --- -int(0) ---- testing: 'abc' % '-7.7' --- -int(0) ---- testing: 'abc' % '123abc' --- -int(0) ---- testing: 'abc' % '123e5' --- -int(0) ---- testing: 'abc' % '123e5xyz' --- -int(0) ---- testing: 'abc' % ' 123abc' --- -int(0) ---- testing: 'abc' % '123 abc' --- -int(0) ---- testing: 'abc' % '123abc ' --- -int(0) ---- testing: 'abc' % '3.4a' --- -int(0) ---- testing: '65' % '65' --- -int(0) ---- testing: '65' % '-44' --- -int(21) ---- testing: '65' % '1.2' --- -int(0) ---- testing: '65' % '-7.7' --- -int(2) ---- testing: '65' % '123abc' --- -int(65) ---- testing: '65' % '123e5' --- -int(65) ---- testing: '65' % '123e5xyz' --- -int(65) ---- testing: '65' % ' 123abc' --- -int(65) ---- testing: '65' % '123 abc' --- -int(65) ---- testing: '65' % '123abc ' --- -int(65) ---- testing: '65' % '3.4a' --- -int(2) ---- testing: '-44' % '65' --- -int(-44) ---- testing: '-44' % '-44' --- -int(0) ---- testing: '-44' % '1.2' --- -int(0) ---- testing: '-44' % '-7.7' --- -int(-2) ---- testing: '-44' % '123abc' --- -int(-44) ---- testing: '-44' % '123e5' --- -int(-44) ---- testing: '-44' % '123e5xyz' --- -int(-44) ---- testing: '-44' % ' 123abc' --- -int(-44) ---- testing: '-44' % '123 abc' --- -int(-44) ---- testing: '-44' % '123abc ' --- -int(-44) ---- testing: '-44' % '3.4a' --- -int(-2) ---- testing: '1.2' % '65' --- -int(1) ---- testing: '1.2' % '-44' --- -int(1) ---- testing: '1.2' % '1.2' --- -int(0) ---- testing: '1.2' % '-7.7' --- -int(1) ---- testing: '1.2' % '123abc' --- -int(1) ---- testing: '1.2' % '123e5' --- -int(1) ---- testing: '1.2' % '123e5xyz' --- -int(1) ---- testing: '1.2' % ' 123abc' --- -int(1) ---- testing: '1.2' % '123 abc' --- -int(1) ---- testing: '1.2' % '123abc ' --- -int(1) ---- testing: '1.2' % '3.4a' --- -int(1) ---- testing: '-7.7' % '65' --- -int(-7) ---- testing: '-7.7' % '-44' --- -int(-7) ---- testing: '-7.7' % '1.2' --- -int(0) ---- testing: '-7.7' % '-7.7' --- -int(0) ---- testing: '-7.7' % '123abc' --- -int(-7) ---- testing: '-7.7' % '123e5' --- -int(-7) ---- testing: '-7.7' % '123e5xyz' --- -int(-7) ---- testing: '-7.7' % ' 123abc' --- -int(-7) ---- testing: '-7.7' % '123 abc' --- -int(-7) ---- testing: '-7.7' % '123abc ' --- -int(-7) ---- testing: '-7.7' % '3.4a' --- -int(-1) ---- testing: '123abc' % '65' --- -int(58) ---- testing: '123abc' % '-44' --- -int(35) ---- testing: '123abc' % '1.2' --- -int(0) ---- testing: '123abc' % '-7.7' --- -int(4) ---- testing: '123abc' % '123abc' --- -int(0) ---- testing: '123abc' % '123e5' --- -int(0) ---- testing: '123abc' % '123e5xyz' --- -int(0) ---- testing: '123abc' % ' 123abc' --- -int(0) ---- testing: '123abc' % '123 abc' --- -int(0) ---- testing: '123abc' % '123abc ' --- -int(0) ---- testing: '123abc' % '3.4a' --- -int(0) ---- testing: '123e5' % '65' --- -int(58) ---- testing: '123e5' % '-44' --- -int(35) ---- testing: '123e5' % '1.2' --- -int(0) ---- testing: '123e5' % '-7.7' --- -int(4) ---- testing: '123e5' % '123abc' --- -int(0) ---- testing: '123e5' % '123e5' --- -int(0) ---- testing: '123e5' % '123e5xyz' --- -int(0) ---- testing: '123e5' % ' 123abc' --- -int(0) ---- testing: '123e5' % '123 abc' --- -int(0) ---- testing: '123e5' % '123abc ' --- -int(0) ---- testing: '123e5' % '3.4a' --- -int(0) ---- testing: '123e5xyz' % '65' --- -int(58) ---- testing: '123e5xyz' % '-44' --- -int(35) ---- testing: '123e5xyz' % '1.2' --- -int(0) ---- testing: '123e5xyz' % '-7.7' --- -int(4) ---- testing: '123e5xyz' % '123abc' --- -int(0) ---- testing: '123e5xyz' % '123e5' --- -int(0) ---- testing: '123e5xyz' % '123e5xyz' --- -int(0) ---- testing: '123e5xyz' % ' 123abc' --- -int(0) ---- testing: '123e5xyz' % '123 abc' --- -int(0) ---- testing: '123e5xyz' % '123abc ' --- -int(0) ---- testing: '123e5xyz' % '3.4a' --- -int(0) ---- testing: ' 123abc' % '65' --- -int(58) ---- testing: ' 123abc' % '-44' --- -int(35) ---- testing: ' 123abc' % '1.2' --- -int(0) ---- testing: ' 123abc' % '-7.7' --- -int(4) ---- testing: ' 123abc' % '123abc' --- -int(0) ---- testing: ' 123abc' % '123e5' --- -int(0) ---- testing: ' 123abc' % '123e5xyz' --- -int(0) ---- testing: ' 123abc' % ' 123abc' --- -int(0) ---- testing: ' 123abc' % '123 abc' --- -int(0) ---- testing: ' 123abc' % '123abc ' --- -int(0) ---- testing: ' 123abc' % '3.4a' --- -int(0) ---- testing: '123 abc' % '65' --- -int(58) ---- testing: '123 abc' % '-44' --- -int(35) ---- testing: '123 abc' % '1.2' --- -int(0) ---- testing: '123 abc' % '-7.7' --- -int(4) ---- testing: '123 abc' % '123abc' --- -int(0) ---- testing: '123 abc' % '123e5' --- -int(0) ---- testing: '123 abc' % '123e5xyz' --- -int(0) ---- testing: '123 abc' % ' 123abc' --- -int(0) ---- testing: '123 abc' % '123 abc' --- -int(0) ---- testing: '123 abc' % '123abc ' --- -int(0) ---- testing: '123 abc' % '3.4a' --- -int(0) ---- testing: '123abc ' % '65' --- -int(58) ---- testing: '123abc ' % '-44' --- -int(35) ---- testing: '123abc ' % '1.2' --- -int(0) ---- testing: '123abc ' % '-7.7' --- -int(4) ---- testing: '123abc ' % '123abc' --- -int(0) ---- testing: '123abc ' % '123e5' --- -int(0) ---- testing: '123abc ' % '123e5xyz' --- -int(0) ---- testing: '123abc ' % ' 123abc' --- -int(0) ---- testing: '123abc ' % '123 abc' --- -int(0) ---- testing: '123abc ' % '123abc ' --- -int(0) ---- testing: '123abc ' % '3.4a' --- -int(0) ---- testing: '3.4a' % '65' --- -int(3) ---- testing: '3.4a' % '-44' --- -int(3) ---- testing: '3.4a' % '1.2' --- -int(0) ---- testing: '3.4a' % '-7.7' --- -int(3) ---- testing: '3.4a' % '123abc' --- -int(3) ---- testing: '3.4a' % '123e5' --- -int(3) ---- testing: '3.4a' % '123e5xyz' --- -int(3) ---- testing: '3.4a' % ' 123abc' --- -int(3) ---- testing: '3.4a' % '123 abc' --- -int(3) ---- testing: '3.4a' % '123abc ' --- -int(3) ---- testing: '3.4a' % '3.4a' --- -int(0) +--- testing: '0' % '0' --- +Exception: Division by zero +--- testing: '0' % '65' --- +int(0) +--- testing: '0' % '-44' --- +int(0) +--- testing: '0' % '1.2' --- +int(0) +--- testing: '0' % '-7.7' --- +int(0) +--- testing: '0' % 'abc' --- +Exception: Division by zero +--- testing: '0' % '123abc' --- +int(0) +--- testing: '0' % '123e5' --- +int(0) +--- testing: '0' % '123e5xyz' --- +int(0) +--- testing: '0' % ' 123abc' --- +int(0) +--- testing: '0' % '123 abc' --- +int(0) +--- testing: '0' % '123abc ' --- +int(0) +--- testing: '0' % '3.4a' --- +int(0) +--- testing: '0' % 'a5.9' --- +Exception: Division by zero +--- testing: '65' % '0' --- +Exception: Division by zero +--- testing: '65' % '65' --- +int(0) +--- testing: '65' % '-44' --- +int(21) +--- testing: '65' % '1.2' --- +int(0) +--- testing: '65' % '-7.7' --- +int(2) +--- testing: '65' % 'abc' --- +Exception: Division by zero +--- testing: '65' % '123abc' --- +int(65) +--- testing: '65' % '123e5' --- +int(65) +--- testing: '65' % '123e5xyz' --- +int(65) +--- testing: '65' % ' 123abc' --- +int(65) +--- testing: '65' % '123 abc' --- +int(65) +--- testing: '65' % '123abc ' --- +int(65) +--- testing: '65' % '3.4a' --- +int(2) +--- testing: '65' % 'a5.9' --- +Exception: Division by zero +--- testing: '-44' % '0' --- +Exception: Division by zero +--- testing: '-44' % '65' --- +int(-44) +--- testing: '-44' % '-44' --- +int(0) +--- testing: '-44' % '1.2' --- +int(0) +--- testing: '-44' % '-7.7' --- +int(-2) +--- testing: '-44' % 'abc' --- +Exception: Division by zero +--- testing: '-44' % '123abc' --- +int(-44) +--- testing: '-44' % '123e5' --- +int(-44) +--- testing: '-44' % '123e5xyz' --- +int(-44) +--- testing: '-44' % ' 123abc' --- +int(-44) +--- testing: '-44' % '123 abc' --- +int(-44) +--- testing: '-44' % '123abc ' --- +int(-44) +--- testing: '-44' % '3.4a' --- +int(-2) +--- testing: '-44' % 'a5.9' --- +Exception: Division by zero +--- testing: '1.2' % '0' --- +Exception: Division by zero +--- testing: '1.2' % '65' --- +int(1) +--- testing: '1.2' % '-44' --- +int(1) +--- testing: '1.2' % '1.2' --- +int(0) +--- testing: '1.2' % '-7.7' --- +int(1) +--- testing: '1.2' % 'abc' --- +Exception: Division by zero +--- testing: '1.2' % '123abc' --- +int(1) +--- testing: '1.2' % '123e5' --- +int(1) +--- testing: '1.2' % '123e5xyz' --- +int(1) +--- testing: '1.2' % ' 123abc' --- +int(1) +--- testing: '1.2' % '123 abc' --- +int(1) +--- testing: '1.2' % '123abc ' --- +int(1) +--- testing: '1.2' % '3.4a' --- +int(1) +--- testing: '1.2' % 'a5.9' --- +Exception: Division by zero +--- testing: '-7.7' % '0' --- +Exception: Division by zero +--- testing: '-7.7' % '65' --- +int(-7) +--- testing: '-7.7' % '-44' --- +int(-7) +--- testing: '-7.7' % '1.2' --- +int(0) +--- testing: '-7.7' % '-7.7' --- +int(0) +--- testing: '-7.7' % 'abc' --- +Exception: Division by zero +--- testing: '-7.7' % '123abc' --- +int(-7) +--- testing: '-7.7' % '123e5' --- +int(-7) +--- testing: '-7.7' % '123e5xyz' --- +int(-7) +--- testing: '-7.7' % ' 123abc' --- +int(-7) +--- testing: '-7.7' % '123 abc' --- +int(-7) +--- testing: '-7.7' % '123abc ' --- +int(-7) +--- testing: '-7.7' % '3.4a' --- +int(-1) +--- testing: '-7.7' % 'a5.9' --- +Exception: Division by zero +--- testing: 'abc' % '0' --- +Exception: Division by zero +--- testing: 'abc' % '65' --- +int(0) +--- testing: 'abc' % '-44' --- +int(0) +--- testing: 'abc' % '1.2' --- +int(0) +--- testing: 'abc' % '-7.7' --- +int(0) +--- testing: 'abc' % 'abc' --- +Exception: Division by zero +--- testing: 'abc' % '123abc' --- +int(0) +--- testing: 'abc' % '123e5' --- +int(0) +--- testing: 'abc' % '123e5xyz' --- +int(0) +--- testing: 'abc' % ' 123abc' --- +int(0) +--- testing: 'abc' % '123 abc' --- +int(0) +--- testing: 'abc' % '123abc ' --- +int(0) +--- testing: 'abc' % '3.4a' --- +int(0) +--- testing: 'abc' % 'a5.9' --- +Exception: Division by zero +--- testing: '123abc' % '0' --- +Exception: Division by zero +--- testing: '123abc' % '65' --- +int(58) +--- testing: '123abc' % '-44' --- +int(35) +--- testing: '123abc' % '1.2' --- +int(0) +--- testing: '123abc' % '-7.7' --- +int(4) +--- testing: '123abc' % 'abc' --- +Exception: Division by zero +--- testing: '123abc' % '123abc' --- +int(0) +--- testing: '123abc' % '123e5' --- +int(0) +--- testing: '123abc' % '123e5xyz' --- +int(0) +--- testing: '123abc' % ' 123abc' --- +int(0) +--- testing: '123abc' % '123 abc' --- +int(0) +--- testing: '123abc' % '123abc ' --- +int(0) +--- testing: '123abc' % '3.4a' --- +int(0) +--- testing: '123abc' % 'a5.9' --- +Exception: Division by zero +--- testing: '123e5' % '0' --- +Exception: Division by zero +--- testing: '123e5' % '65' --- +int(58) +--- testing: '123e5' % '-44' --- +int(35) +--- testing: '123e5' % '1.2' --- +int(0) +--- testing: '123e5' % '-7.7' --- +int(4) +--- testing: '123e5' % 'abc' --- +Exception: Division by zero +--- testing: '123e5' % '123abc' --- +int(0) +--- testing: '123e5' % '123e5' --- +int(0) +--- testing: '123e5' % '123e5xyz' --- +int(0) +--- testing: '123e5' % ' 123abc' --- +int(0) +--- testing: '123e5' % '123 abc' --- +int(0) +--- testing: '123e5' % '123abc ' --- +int(0) +--- testing: '123e5' % '3.4a' --- +int(0) +--- testing: '123e5' % 'a5.9' --- +Exception: Division by zero +--- testing: '123e5xyz' % '0' --- +Exception: Division by zero +--- testing: '123e5xyz' % '65' --- +int(58) +--- testing: '123e5xyz' % '-44' --- +int(35) +--- testing: '123e5xyz' % '1.2' --- +int(0) +--- testing: '123e5xyz' % '-7.7' --- +int(4) +--- testing: '123e5xyz' % 'abc' --- +Exception: Division by zero +--- testing: '123e5xyz' % '123abc' --- +int(0) +--- testing: '123e5xyz' % '123e5' --- +int(0) +--- testing: '123e5xyz' % '123e5xyz' --- +int(0) +--- testing: '123e5xyz' % ' 123abc' --- +int(0) +--- testing: '123e5xyz' % '123 abc' --- +int(0) +--- testing: '123e5xyz' % '123abc ' --- +int(0) +--- testing: '123e5xyz' % '3.4a' --- +int(0) +--- testing: '123e5xyz' % 'a5.9' --- +Exception: Division by zero +--- testing: ' 123abc' % '0' --- +Exception: Division by zero +--- testing: ' 123abc' % '65' --- +int(58) +--- testing: ' 123abc' % '-44' --- +int(35) +--- testing: ' 123abc' % '1.2' --- +int(0) +--- testing: ' 123abc' % '-7.7' --- +int(4) +--- testing: ' 123abc' % 'abc' --- +Exception: Division by zero +--- testing: ' 123abc' % '123abc' --- +int(0) +--- testing: ' 123abc' % '123e5' --- +int(0) +--- testing: ' 123abc' % '123e5xyz' --- +int(0) +--- testing: ' 123abc' % ' 123abc' --- +int(0) +--- testing: ' 123abc' % '123 abc' --- +int(0) +--- testing: ' 123abc' % '123abc ' --- +int(0) +--- testing: ' 123abc' % '3.4a' --- +int(0) +--- testing: ' 123abc' % 'a5.9' --- +Exception: Division by zero +--- testing: '123 abc' % '0' --- +Exception: Division by zero +--- testing: '123 abc' % '65' --- +int(58) +--- testing: '123 abc' % '-44' --- +int(35) +--- testing: '123 abc' % '1.2' --- +int(0) +--- testing: '123 abc' % '-7.7' --- +int(4) +--- testing: '123 abc' % 'abc' --- +Exception: Division by zero +--- testing: '123 abc' % '123abc' --- +int(0) +--- testing: '123 abc' % '123e5' --- +int(0) +--- testing: '123 abc' % '123e5xyz' --- +int(0) +--- testing: '123 abc' % ' 123abc' --- +int(0) +--- testing: '123 abc' % '123 abc' --- +int(0) +--- testing: '123 abc' % '123abc ' --- +int(0) +--- testing: '123 abc' % '3.4a' --- +int(0) +--- testing: '123 abc' % 'a5.9' --- +Exception: Division by zero +--- testing: '123abc ' % '0' --- +Exception: Division by zero +--- testing: '123abc ' % '65' --- +int(58) +--- testing: '123abc ' % '-44' --- +int(35) +--- testing: '123abc ' % '1.2' --- +int(0) +--- testing: '123abc ' % '-7.7' --- +int(4) +--- testing: '123abc ' % 'abc' --- +Exception: Division by zero +--- testing: '123abc ' % '123abc' --- +int(0) +--- testing: '123abc ' % '123e5' --- +int(0) +--- testing: '123abc ' % '123e5xyz' --- +int(0) +--- testing: '123abc ' % ' 123abc' --- +int(0) +--- testing: '123abc ' % '123 abc' --- +int(0) +--- testing: '123abc ' % '123abc ' --- +int(0) +--- testing: '123abc ' % '3.4a' --- +int(0) +--- testing: '123abc ' % 'a5.9' --- +Exception: Division by zero +--- testing: '3.4a' % '0' --- +Exception: Division by zero +--- testing: '3.4a' % '65' --- +int(3) +--- testing: '3.4a' % '-44' --- +int(3) +--- testing: '3.4a' % '1.2' --- +int(0) +--- testing: '3.4a' % '-7.7' --- +int(3) +--- testing: '3.4a' % 'abc' --- +Exception: Division by zero +--- testing: '3.4a' % '123abc' --- +int(3) +--- testing: '3.4a' % '123e5' --- +int(3) +--- testing: '3.4a' % '123e5xyz' --- +int(3) +--- testing: '3.4a' % ' 123abc' --- +int(3) +--- testing: '3.4a' % '123 abc' --- +int(3) +--- testing: '3.4a' % '123abc ' --- +int(3) +--- testing: '3.4a' % '3.4a' --- +int(0) +--- testing: '3.4a' % 'a5.9' --- +Exception: Division by zero +--- testing: 'a5.9' % '0' --- +Exception: Division by zero +--- testing: 'a5.9' % '65' --- +int(0) +--- testing: 'a5.9' % '-44' --- +int(0) +--- testing: 'a5.9' % '1.2' --- +int(0) +--- testing: 'a5.9' % '-7.7' --- +int(0) +--- testing: 'a5.9' % 'abc' --- +Exception: Division by zero +--- testing: 'a5.9' % '123abc' --- +int(0) +--- testing: 'a5.9' % '123e5' --- +int(0) +--- testing: 'a5.9' % '123e5xyz' --- +int(0) +--- testing: 'a5.9' % ' 123abc' --- +int(0) +--- testing: 'a5.9' % '123 abc' --- +int(0) +--- testing: 'a5.9' % '123abc ' --- +int(0) +--- testing: 'a5.9' % '3.4a' --- +int(0) +--- testing: 'a5.9' % 'a5.9' --- +Exception: Division by zero ===DONE=== diff --git a/tests/run-test/test005.phpt b/tests/run-test/test005.phpt index 1413a198a67..5dcb650444f 100644 --- a/tests/run-test/test005.phpt +++ b/tests/run-test/test005.phpt @@ -19,7 +19,8 @@ var_dump(ini_get('track_errors')); ini_set('display_errors', 0); var_dump(ini_get('display_errors')); var_dump($php_errormsg); -ini_set("zend.assertions", -1); +$zero = 0; +$error = 1 / $zero; var_dump($php_errormsg); ?> --EXPECTF-- @@ -29,4 +30,4 @@ string(1) "0" string(1) "1" string(1) "0" NULL -string(%d) "%senabled or disabled%s" +string(%d) "%sivision by zer%s" diff --git a/tests/run-test/test008a.phpt b/tests/run-test/test008a.phpt index 13cba45c323..ff2a93be0fc 100644 --- a/tests/run-test/test008a.phpt +++ b/tests/run-test/test008a.phpt @@ -19,7 +19,8 @@ var_dump(ini_get('track_errors')); ini_set('display_errors', 0); var_dump(ini_get('display_errors')); var_dump($php_errormsg); -ini_set("zend.assertions", -1); +$zero = 0; +$error = 1 / $zero; var_dump($php_errormsg); ?> --EXPECTF-- @@ -29,4 +30,4 @@ string(1) "0" string(1) "1" string(1) "0" NULL -string(%d) "%senabled or disabled%s" +string(%d) "%sivision by zer%s"