]> granicus.if.org Git - php/commitdiff
Fix two 32-bit tests for zpp changes
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 12 Jun 2019 13:47:42 +0000 (15:47 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 12 Jun 2019 13:47:42 +0000 (15:47 +0200)
ext/standard/tests/math/bindec_variation1.phpt
ext/standard/tests/math/hexdec_variation1.phpt

index 6041af19dcc24904312bd6a0b71e6fa6d81f4ee0..307d021d99ca899a0883f27555e518cabfe26165 100644 (file)
@@ -73,7 +73,11 @@ $inputs = array(
 $iterator = 1;
 foreach($inputs as $input) {
        echo "\n-- Iteration $iterator --\n";
-       var_dump(bindec($input));
+       try {
+               var_dump(bindec($input));
+       } catch (TypeError $e) {
+               echo $e->getMessage(), "\n";
+       }
        $iterator++;
 };
 fclose($fp);
@@ -134,9 +138,7 @@ int(0)
 int(0)
 
 -- Iteration 18 --
-
-Notice: Array to string conversion in %s on line %d
-int(0)
+bindec() expects parameter 1 to be string, array given
 
 -- Iteration 19 --
 int(0)
@@ -154,5 +156,5 @@ int(0)
 int(0)
 
 -- Iteration 24 --
-int(%d)
+bindec() expects parameter 1 to be string, resource given
 ===Done===
index 00b11d2b3ddebdc40726b952ad55955f0e3ebcc3..5405c72c8eea61338e8c6a50a232f1c09c8e2490 100644 (file)
@@ -77,7 +77,11 @@ $inputs = array(
 $iterator = 1;
 foreach($inputs as $input) {
        echo "\n-- Iteration $iterator --\n";
-       var_dump(hexdec($input));
+       try {
+               var_dump(hexdec($input));
+       } catch (TypeError $e) {
+               echo $e->getMessage(), "\n";
+       }
        $iterator++;
 };
 fclose($fp);
@@ -144,9 +148,7 @@ int(0)
 int(0)
 
 -- Iteration 20 --
-
-Notice: Array to string conversion in %s on line %d
-int(170)
+hexdec() expects parameter 1 to be string, array given
 
 -- Iteration 21 --
 int(2748)
@@ -164,5 +166,5 @@ int(0)
 int(0)
 
 -- Iteration 26 --
-%s
+hexdec() expects parameter 1 to be string, resource given
 ===Done===