diff options
Diffstat (limited to 'Zend/tests/004.phpt')
-rw-r--r-- | Zend/tests/004.phpt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Zend/tests/004.phpt b/Zend/tests/004.phpt index 2f733f1bd8..b5b476cc1b 100644 --- a/Zend/tests/004.phpt +++ b/Zend/tests/004.phpt @@ -4,19 +4,19 @@ strncmp() tests <?php var_dump(strncmp("", "", 100)); -var_dump(strncmp("aef", "dfsgbdf", -1)); +try { + var_dump(strncmp("aef", "dfsgbdf", -1)); +} catch (\ValueError $e) { + echo $e->getMessage() . \PHP_EOL; +} var_dump(strncmp("fghjkl", "qwer", 0)); var_dump(strncmp("qwerty", "qwerty123", 6)); var_dump(strncmp("qwerty", "qwerty123", 7)); -echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- int(0) - -Warning: Length must be greater than or equal to 0 in %s on line %d -bool(false) +strncmp(): Argument #3 ($len) must be greater than or equal to 0 int(0) int(0) int(-1) -Done |