summaryrefslogtreecommitdiff
path: root/ext/standard/tests/math/decoct_variation1_64bit.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/math/decoct_variation1_64bit.phpt')
-rw-r--r--ext/standard/tests/math/decoct_variation1_64bit.phpt38
1 files changed, 20 insertions, 18 deletions
diff --git a/ext/standard/tests/math/decoct_variation1_64bit.phpt b/ext/standard/tests/math/decoct_variation1_64bit.phpt
index 7c1a8f2145..35a9c89288 100644
--- a/ext/standard/tests/math/decoct_variation1_64bit.phpt
+++ b/ext/standard/tests/math/decoct_variation1_64bit.phpt
@@ -78,15 +78,19 @@ $inputs = array(
);
// loop through each element of $inputs to check the behaviour of decoct()
-$iterator = 1;
-foreach($inputs as $input) {
+foreach($inputs as $i => $input) {
+ $iterator = $i + 1;
echo "\n-- Iteration $iterator --\n";
- var_dump(decoct($input));
- $iterator++;
-};
+ try {
+ var_dump(decoct($input));
+ } catch (TypeError $exception) {
+ echo $exception->getMessage() . "\n";
+ }
+}
fclose($fp);
+
?>
---EXPECTF--
+--EXPECT--
*** Testing decoct() : usage variations ***
-- Iteration 1 --
@@ -102,10 +106,10 @@ string(5) "30071"
string(22) "1777777777777777773327"
-- Iteration 5 --
-string(1) "0"
+decoct(): Argument #1 ($number) must be of type int, float given
-- Iteration 6 --
-string(1) "0"
+decoct(): Argument #1 ($number) must be of type int, float given
-- Iteration 7 --
string(2) "12"
@@ -141,27 +145,25 @@ string(1) "1"
string(1) "0"
-- Iteration 18 --
-string(1) "0"
+decoct(): Argument #1 ($number) must be of type int, string given
-- Iteration 19 --
-string(1) "0"
+decoct(): Argument #1 ($number) must be of type int, string given
-- Iteration 20 --
-string(1) "0"
+decoct(): Argument #1 ($number) must be of type int, array given
-- Iteration 21 --
-string(1) "0"
+decoct(): Argument #1 ($number) must be of type int, string given
-- Iteration 22 --
-string(1) "0"
+decoct(): Argument #1 ($number) must be of type int, string given
-- Iteration 23 --
-string(1) "0"
+decoct(): Argument #1 ($number) must be of type int, string given
-- Iteration 24 --
-
-Notice: Object of class classA could not be converted to int in %s on line %d
-string(1) "1"
+decoct(): Argument #1 ($number) must be of type int, classA given
-- Iteration 25 --
string(1) "0"
@@ -170,4 +172,4 @@ string(1) "0"
string(1) "0"
-- Iteration 27 --
-string(%d) "%d"
+decoct(): Argument #1 ($number) must be of type int, resource given