summaryrefslogtreecommitdiff
path: root/ext/standard/tests/math/decoct_basic.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/math/decoct_basic.phpt')
-rw-r--r--ext/standard/tests/math/decoct_basic.phpt38
1 files changed, 38 insertions, 0 deletions
diff --git a/ext/standard/tests/math/decoct_basic.phpt b/ext/standard/tests/math/decoct_basic.phpt
new file mode 100644
index 000000000..3021e6be1
--- /dev/null
+++ b/ext/standard/tests/math/decoct_basic.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test decoct() - basic function test decoct()
+--FILE--
+<?php
+$values = array(10,
+ 3950.5,
+ 3.9505e3,
+ 039,
+ 0x5F,
+ "10",
+ "3950.5",
+ "3.9505e3",
+ "039",
+ "0x5F",
+ true,
+ false,
+ null,
+ );
+
+for ($i = 0; $i < count($values); $i++) {
+ $res = decoct($values[$i]);
+ var_dump($res);
+}
+?>
+--EXPECTF--
+string(2) "12"
+string(4) "7556"
+string(4) "7556"
+string(1) "3"
+string(3) "137"
+string(2) "12"
+string(4) "7556"
+string(1) "3"
+string(2) "47"
+string(1) "0"
+string(1) "1"
+string(1) "0"
+string(1) "0"