1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Files
archived-php-src/ext/standard/tests/dir/readdir_variation7.phpt
T
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

29 lines
665 B
PHP

--TEST--
Test readdir() function : usage variations - use file pointers
--FILE--
<?php
/* Prototype : string readdir([resource $dir_handle])
* Description: Read directory entry from dir_handle
* Source code: ext/standard/dir.c
*/
/*
* Open a file pointer using fopen and pass to readdir() to test behaviour
*/
echo "*** Testing readdir() : usage variations ***\n";
// get a resource variable
var_dump($fp = fopen(__FILE__, "r"));
try {
var_dump( readdir($fp) );
} catch (\TypeError $e) {
echo $e->getMessage() . "\n";
}
?>
--EXPECTF--
*** Testing readdir() : usage variations ***
resource(%d) of type (stream)
%d is not a valid Directory resource