1--TEST-- 2Test disk_total_space() function : error conditions 3--SKIPIF-- 4<?php 5if(substr(PHP_OS, 0, 3) == 'WIN') 6 die("skip Not valid on Windows"); 7?> 8--CONFLICTS-- 9disk_total_space 10--FILE-- 11<?php 12echo "*** Testing error conditions ***\n"; 13$file_path = __DIR__; 14 15var_dump( disk_total_space( $file_path."/dir1" )); // Invalid directory 16 17$fh = fopen( $file_path."/disk_total_space.tmp", "w" ); 18fwrite( $fh, " Garbage data for the temporary file" ); 19var_dump( disk_total_space( $file_path."/disk_total_space.tmp" )); // file input instead of directory 20fclose($fh); 21 22echo"\n--- Done ---"; 23?> 24--CLEAN-- 25<?php 26$file_path = __DIR__; 27unlink($file_path."/disk_total_space.tmp"); 28?> 29--EXPECTF-- 30*** Testing error conditions *** 31 32Warning: disk_total_space(): No such file or directory in %s on line %d 33bool(false) 34float(%f) 35 36--- Done --- 37