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";
24unlink($filename);
25
26
27?>
28--EXPECT--
29*** Testing file_put_contents() : variation ***
30int(25)
31int(18)
3243
33The first string to write, followed by this
3425
35The first string to write
36