芝麻web文件管理V1.00
编辑当前文件:/home/strato/chroot/opt/RZphp5/includes/test/Math_Basex/tests/bcmath.integer-test.php
toBase(123456), "CDFBDCA"); echo validateResult("toDecimal(\"BADA\")", $base->toDecimal("BADA"), "234"); echo "\n\n"; //PHASE 2: Testing int2 $base->setBase("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); echo "Changing to character base 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n"; echo validateResult("int2 (Max 65536) toBase(65432)", $base->toBase(65432), "DSUQ"); echo validateResult("int2 (Max 65536) tobase(67000) OVERFLOW!", $base->toBase(67000), "DVCY"); //PHASE 3: Testing int4 echo validateResult("int4 (Max 42944967297) toBase(64872767)", $base->toBase(64872767), "FLYZQL"); echo validateResult("int4 (Max 42944967297) tobase(43987654321) OVERFLOW!", $base->toBase(43987654309), "FMKGDIOB"); //PHASE $: Testing int8 echo validateResult("int8 (Max 18446744073709551616)". " toBase(18446744073709551610)", $base->toBase(1844674409510065), "NBTNBSZVFVD"); echo validateResult("int8 (Max 18446744073709551616)". " tobase(18446744073709551618) OVERFLOW!", $base->toBase("18446744098897893117"), "HLHXCZQBGYKMWB"); function validateResult($description, $result, $compareString) { if ((string)$result == (string)$compareString) { $ret = "$description\n - PASSED\n"; } else { $ret = "$description\n - FAILED - result was $result, " ."expecting $compareString\n"; } return $ret; } ?>