1--TEST--
2Test filesize() function: usage variations - size of files
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') {
6     die('skip Not valid on Windows');
7}
8--FILE--
9<?php
10/*
11 Prototype   : int filesize ( string $filename );
12 Description : Returns the size of the file in bytes, or FALSE
13   (and generates an error of level E_WARNING) in case of an error.
14*/
15
16$file_path = dirname(__FILE__);
17require($file_path."/file.inc");
18
19echo "*** Testing filesize(): usage variations ***\n";
20
21echo "*** Checking filesize() with different size of files ***\n";
22for($size = 1; $size <10000; $size = $size+1000)
23{
24  create_files($file_path, 1, "numeric", 0755, $size, "w", "filesize_variation");
25  var_dump( filesize( $file_path."/filesize_variation1.tmp") );
26  clearstatcache();
27  delete_files($file_path, 1, "filesize_variation");
28}
29
30echo "Done\n";
31--EXPECTF--
32*** Testing filesize(): usage variations ***
33*** Checking filesize() with different size of files ***
34int(%d)
35int(%d)
36int(%d)
37int(%d)
38int(%d)
39int(%d)
40int(%d)
41int(%d)
42int(%d)
43int(%d)
44Done
45