getting towards base functionality
[PHPIPManager.git] / unittest / ip6tolong.php
diff --git a/unittest/ip6tolong.php b/unittest/ip6tolong.php
new file mode 100644 (file)
index 0000000..d5ee6c8
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+require_once "../lib/lib.php";
+
+$ori_str = "2003:1:2:3::1";
+$str = ip6ToLongStr($ori_str);
+
+echo "str: $ori_str, $str\n";
+
+$ori_str = "2003:1:2:3:23:34:23:1";
+$str = ip6ToLongStr($ori_str);
+
+echo "str: $ori_str, $str\n";
+
+if(function_exists("gmp_add")) echo "gmp_add exists\n";
+if(function_exists("bc_sub")) echo "bc_sub exists\n";
+
+
+?>
\ No newline at end of file