diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/standard/tests/math/pow_variation1.phpt | 12 | ||||
-rw-r--r-- | ext/standard/tests/math/pow_variation1_64bit.phpt | 12 | ||||
-rw-r--r-- | ext/standard/tests/math/pow_variation2.phpt | 12 |
3 files changed, 24 insertions, 12 deletions
diff --git a/ext/standard/tests/math/pow_variation1.phpt b/ext/standard/tests/math/pow_variation1.phpt index a3e13d861c..86df8e0eb4 100644 --- a/ext/standard/tests/math/pow_variation1.phpt +++ b/ext/standard/tests/math/pow_variation1.phpt @@ -84,9 +84,13 @@ $inputs = array( // loop through each element of $inputs to check the behaviour of pow() $iterator = 1; foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump(pow($input, 3)); - $iterator++; + echo "\n-- Iteration $iterator --\n"; + try { + var_dump(pow($input, 3)); + } catch (Error $e) { + echo $e->getMessage(), "\n"; + } + $iterator++; }; fclose($fp); ?> @@ -153,7 +157,7 @@ Warning: A non-numeric value encountered in %s on line %d int(0) -- Iteration 19 -- -int(0) +Unsupported operand types -- Iteration 20 -- diff --git a/ext/standard/tests/math/pow_variation1_64bit.phpt b/ext/standard/tests/math/pow_variation1_64bit.phpt index 0d8b1960be..da63ae3d9f 100644 --- a/ext/standard/tests/math/pow_variation1_64bit.phpt +++ b/ext/standard/tests/math/pow_variation1_64bit.phpt @@ -84,9 +84,13 @@ $inputs = array( // loop through each element of $inputs to check the behaviour of pow() $iterator = 1; foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump(pow($input, 3)); - $iterator++; + echo "\n-- Iteration $iterator --\n"; + try { + var_dump(pow($input, 3)); + } catch (Error $e) { + echo $e->getMessage(), "\n"; + } + $iterator++; }; fclose($fp); ?> @@ -153,7 +157,7 @@ Warning: A non-numeric value encountered in %s on line %d int(0) -- Iteration 19 -- -int(0) +Unsupported operand types -- Iteration 20 -- diff --git a/ext/standard/tests/math/pow_variation2.phpt b/ext/standard/tests/math/pow_variation2.phpt index 4876447da9..83d1fda065 100644 --- a/ext/standard/tests/math/pow_variation2.phpt +++ b/ext/standard/tests/math/pow_variation2.phpt @@ -80,9 +80,13 @@ $inputs = array( // loop through each element of $inputs to check the behaviour of pow() $iterator = 1; foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump(pow(20.3, $input)); - $iterator++; + echo "\n-- Iteration $iterator --\n"; + try { + var_dump(pow(20.3, $input)); + } catch (Error $e) { + echo $e->getMessage(), "\n"; + } + $iterator++; }; fclose($fp); ?> @@ -149,7 +153,7 @@ Warning: A non-numeric value encountered in %s on line %d float(1) -- Iteration 19 -- -int(1) +Unsupported operand types -- Iteration 20 -- |