1--TEST--
2Test file_put_contents() function : variation - test append flag
3--CREDITS--
4Dave Kelsey <d_kelsey@uk.ibm.com>
5--FILE--
6<?php
7echo "*** Testing file_put_contents() : variation ***\n";
8
9$filename = "FilePutContentsVar1.tmp";
10
11$data = "The first string to write";
12$extra = ", followed by this";
13
14var_dump(file_put_contents($filename, $data));
15var_dump(file_put_contents($filename, $extra, FILE_APPEND));
16echo filesize($filename)."\n";
17readfile($filename);
18echo "\n";
19clearstatcache();
20file_put_contents($filename, $data);
21echo filesize($filename)."\n";
22readfile($filename);
23echo "\n";
24
25
26?>
27--CLEAN--
28<?php
29$filename = "FilePutContentsVar1.tmp";
30unlink($filename);
31?>
32--EXPECT--
33*** Testing file_put_contents() : variation ***
34int(25)
35int(18)
3643
37The first string to write, followed by this
3825
39The first string to write
40