1--TEST-- 2Test fileinode() function: usage variations - invalid filenames 3--CREDITS-- 4Dave Kelsey <d_kelsey@uk.ibm.com> 5--CONFLICTS-- 6obscure_filename 7--FILE-- 8<?php 9/* Testing fileinode() 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 "", 19 TRUE, 20 FALSE, 21 22 /* scalars */ 23 1234, 24 0 25); 26 27/* loop through to test each element the above array */ 28foreach( $filenames as $filename ) { 29 var_dump( fileinode($filename) ); 30 clearstatcache(); 31} 32?> 33--EXPECTF-- 34*** Testing Invalid file types *** 35 36Warning: fileinode(): stat failed for -2.34555 in %s on line %d 37bool(false) 38 39Warning: fileinode(): stat failed for in %s on line %d 40bool(false) 41bool(false) 42 43Warning: fileinode(): stat failed for 1 in %s on line %d 44bool(false) 45bool(false) 46 47Warning: fileinode(): stat failed for 1234 in %s on line %d 48bool(false) 49 50Warning: fileinode(): stat failed for 0 in %s on line %d 51bool(false) 52