php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /var/www/html/outlet/pusat/images/customer/php1/tests/function/ |
| files >> //var/www/html/outlet/pusat/images/customer/php1/tests/function/file_put_contents.phpt |
--TEST--
Function -- file_put_contents
--FILE--
<?php
require_once 'PHP/Compat/Function/file_put_contents.php';
// Create a temp file
$tmpfname = tempnam('/tmp', 'phpcompat');
// With a string
$string = "abcd";
echo php_compat_file_put_contents($tmpfname, $string), "\n";
echo implode('', file($tmpfname)), "\n";
// With an array
$string = array('foo', 'bar');
echo php_compat_file_put_contents($tmpfname, $string), "\n";
echo implode('', file($tmpfname)), "\n";
// Test append
$string = 'foobar';
$string2 = 'testtest';
$tmpfname = tempnam('/tmp', 'php');
echo php_compat_file_put_contents($tmpfname, $string), "\n";
echo php_compat_file_put_contents($tmpfname, $string2, FILE_APPEND), "\n";
echo implode('', file($tmpfname)), "\n";
echo php_compat_file_put_contents($tmpfname, $string2), "\n";
echo implode('', file($tmpfname));
unlink($tmpfname);
?>
--EXPECT--
4
abcd
6
foobar
6
8
foobartesttest
8
testtest
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`