xref: /php-src/ext/standard/tests/file/005_basic.phpt (revision b5c7a83d)
1--TEST--
2Test fileatime(), filemtime(), filectime() & touch() functions : basic functionality
3--FILE--
4<?php
5
6echo "*** Testing the basic functionality with file ***\n";
7print( @date('Y:M:D:H:i:s', fileatime(__FILE__)) )."\n";
8print( @date('Y:M:D:H:i:s', filemtime(__FILE__)) )."\n";
9print( @date('Y:M:D:H:i:s', filectime(__FILE__)) )."\n";
10print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic.tmp")) )."\n";
11
12echo "*** Testing the basic functionality with dir ***\n";
13print( @date('Y:M:D:H:i:s', fileatime(".")) )."\n";
14print( @date('Y:M:D:H:i:s', filemtime(".")) )."\n";
15print( @date('Y:M:D:H:i:s', filectime(".")) )."\n";
16print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic")) )."\n";
17
18echo "\n*** Done ***\n";
19?>
20--CLEAN--
21<?php
22unlink(__DIR__."/005_basic.tmp");
23unlink(__DIR__."/005_basic");
24?>
25--EXPECTF--
26*** Testing the basic functionality with file ***
27%d:%s:%s:%d:%d:%d
28%d:%s:%s:%d:%d:%d
29%d:%s:%s:%d:%d:%d
30%d:%s:%s:%d:%d:%d
31*** Testing the basic functionality with dir ***
32%d:%s:%s:%d:%d:%d
33%d:%s:%s:%d:%d:%d
34%d:%s:%s:%d:%d:%d
35%d:%s:%s:%d:%d:%d
36
37*** Done ***
38