1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/standard/tests/strings/dirname_error.phpt
2019-03-11 11:32:20 +01:00

21 lines
423 B
PHP

--TEST--
Test dirname() function : error conditions
--FILE--
<?php
/* Prototype: string dirname ( string $path );
Description: Returns directory name component of path.
*/
echo "*** Testing error conditions ***\n";
// Bad arg
var_dump( dirname("/var/tmp/bar.gz", 0) );
echo "Done\n";
?>
--EXPECTF--
*** Testing error conditions ***
Warning: dirname(): Invalid argument, levels must be >= 1 in %s on line %d
NULL
Done