1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/standard/tests/strings/dirname_error.phpt
2020-06-24 13:13:44 +02:00

18 lines
342 B
PHP

--TEST--
Test dirname() function : error conditions
--FILE--
<?php
echo "*** Testing error conditions ***\n";
// Bad arg
try {
dirname("/var/tmp/bar.gz", 0);
} catch (\ValueError $e) {
echo $e->getMessage() . "\n";
}
?>
--EXPECT--
*** Testing error conditions ***
dirname(): Argument #2 ($levels) must be greater than or equal to 1