php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /opt/php-7.0.1/ext/standard/tests/dir/ |
files >> //opt/php-7.0.1/ext/standard/tests/dir/closedir_variation3.phpt |
--TEST-- Test closedir() function : usage variations - close a file pointer --FILE-- <?php /* Prototype : void closedir([resource $dir_handle]) * Description: Close directory connection identified by the dir_handle * Source code: ext/standard/dir.c * Alias to functions: close */ /* * Create a file pointer using fopen() then try to close it using closedir() */ echo "*** Testing closedir() : usage variations ***\n"; echo "\n-- Open a file using fopen() --\n"; var_dump($fp = fopen(__FILE__, 'r')); echo "\n-- Try to close the file pointer using closedir() --\n"; var_dump(closedir($fp)); echo "\n-- Check file pointer: --\n"; var_dump($fp); if(is_resource($fp)) { fclose($fp); } ?> ===DONE=== --EXPECTF-- *** Testing closedir() : usage variations *** -- Open a file using fopen() -- resource(%d) of type (stream) -- Try to close the file pointer using closedir() -- Warning: closedir(): %d is not a valid Directory resource in %s on line %d bool(false) -- Check file pointer: -- resource(%d) of type (stream) ===DONE===y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`