Return to filetype_variation2.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / file |
1.1 misho 1: --TEST-- 2: Test filetype() function: Check character type 3: --CREDITS-- 4: Dave Kelsey <d_kelsey@uk.ibm.com> 5: --SKIPIF-- 6: <?php 7: if (substr(PHP_OS, 0, 3) == 'WIN') { 8: die('skip no /dev on Windows'); 9: } 10: if (!file_exists("/dev/console")) { 11: die('skip /dev/console not available'); 12: } 13: ?> 14: --FILE-- 15: <?php 16: /* 17: Prototype: string filetype ( string $filename ); 18: Description: Returns the type of the file. Possible values are fifo, char, 19: dir, block, link, file, and unknown. 20: */ 21: 22: echo "-- Checking for char --\n"; 23: print( filetype("/dev/console") )."\n"; 24: ?> 25: ===DONE=== 26: --EXPECTF-- 27: -- Checking for char -- 28: char 29: ===DONE===