1--TEST-- 2Test readlink() function: usage variations - invalid filenames 3--CREDITS-- 4Dave Kelsey <d_kelsey@uk.ibm.com> 5--CONFLICTS-- 6obscure_filename 7--FILE-- 8<?php 9/* Testing readlink() with invalid arguments -int, float, bool, NULL, resource */ 10 11$file_path = __DIR__; 12 13echo "*** Testing Invalid file types ***\n"; 14$filenames = array( 15 /* Invalid filenames */ 16 -2.34555, 17 "", 18 TRUE, 19 FALSE, 20 21 /* scalars */ 22 1234, 23 0 24); 25 26/* loop through to test each element the above array */ 27foreach( $filenames as $filename ) { 28 var_dump( readlink($filename) ); 29 clearstatcache(); 30} 31?> 32--EXPECTF-- 33*** Testing Invalid file types *** 34 35Warning: readlink(): %s in %s on line %d 36bool(false) 37 38Warning: readlink(): %s in %s on line %d 39bool(false) 40 41Warning: readlink(): %s in %s on line %d 42bool(false) 43 44Warning: readlink(): %s in %s on line %d 45bool(false) 46 47Warning: readlink(): %s in %s on line %d 48bool(false) 49 50Warning: readlink(): %s in %s on line %d 51bool(false) 52