1--TEST--
2Test readdir() function : usage variations - use file pointers
3--FILE--
4<?php
5/* Prototype  : string readdir([resource $dir_handle])
6 * Description: Read directory entry from dir_handle
7 * Source code: ext/standard/dir.c
8 */
9
10/*
11 * Open a file pointer using fopen and pass to readdir() to test behaviour
12 */
13
14echo "*** Testing readdir() : usage variations ***\n";
15
16// get a resource variable
17var_dump($fp = fopen(__FILE__, "r"));
18var_dump( readdir($fp) );
19
20?>
21===DONE===
22--EXPECTF--
23*** Testing readdir() : usage variations ***
24resource(%d) of type (stream)
25
26Warning: readdir(): %d is not a valid Directory resource in %s on line %d
27bool(false)
28===DONE===
29