diff options
Diffstat (limited to 'ext/standard/tests/math/pow_variation1.phpt')
-rw-r--r-- | ext/standard/tests/math/pow_variation1.phpt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/standard/tests/math/pow_variation1.phpt b/ext/standard/tests/math/pow_variation1.phpt index a3e13d861c..e005ced560 100644 --- a/ext/standard/tests/math/pow_variation1.phpt +++ b/ext/standard/tests/math/pow_variation1.phpt @@ -84,13 +84,16 @@ $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); ?> -===Done=== --EXPECTF-- *** Testing pow() : usage variations *** @@ -153,7 +156,7 @@ Warning: A non-numeric value encountered in %s on line %d int(0) -- Iteration 19 -- -int(0) +Unsupported operand types -- Iteration 20 -- @@ -183,4 +186,3 @@ int(0) -- Iteration 26 -- %s -===Done=== |