--TEST-- Test dir() function : usage variations - operate on previously opened directory --FILE-- read() ); // with previous handle echo "-- reading directory contents with current handle --\n"; var_dump( $e->read() ); // with current handle // delete temporary files delete_files($dir_path, 3, "dir_variation4"); echo "Done"; ?> --CLEAN-- --EXPECTF-- *** Testing dir() : operate on previously opened directory *** object(Directory)#%d (2) { ["path"]=> string(%d) "%s/dir_variation4" ["handle"]=> resource(%d) of type (stream) } object(Directory)#%d (2) { ["path"]=> string(%d) "%s/dir_variation4" ["handle"]=> resource(%d) of type (stream) } -- reading directory contents with previous handle -- string(%d) "%s" -- reading directory contents with current handle -- string(%d) "%s" Done