forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path005_basic.phpt
37 lines (33 loc) · 1.05 KB
/
005_basic.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--TEST--
Test fileatime(), filemtime(), filectime() & touch() functions : basic functionality
--FILE--
<?php
echo "*** Testing the basic functionality with file ***\n";
print( @date('Y:M:D:H:i:s', fileatime(__FILE__)) )."\n";
print( @date('Y:M:D:H:i:s', filemtime(__FILE__)) )."\n";
print( @date('Y:M:D:H:i:s', filectime(__FILE__)) )."\n";
print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic.tmp")) )."\n";
echo "*** Testing the basic functionality with dir ***\n";
print( @date('Y:M:D:H:i:s', fileatime(".")) )."\n";
print( @date('Y:M:D:H:i:s', filemtime(".")) )."\n";
print( @date('Y:M:D:H:i:s', filectime(".")) )."\n";
print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic")) )."\n";
echo "\n*** Done ***\n";
?>
--CLEAN--
<?php
unlink(__DIR__."/005_basic.tmp");
unlink(__DIR__."/005_basic");
?>
--EXPECTF--
*** Testing the basic functionality with file ***
%d:%s:%s:%d:%d:%d
%d:%s:%s:%d:%d:%d
%d:%s:%s:%d:%d:%d
%d:%s:%s:%d:%d:%d
*** Testing the basic functionality with dir ***
%d:%s:%s:%d:%d:%d
%d:%s:%s:%d:%d:%d
%d:%s:%s:%d:%d:%d
%d:%s:%s:%d:%d:%d
*** Done ***