1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/spl/tests/SplFileObject/SplFileObject_fwrite_variation_001.phpt
2022-05-27 18:33:48 +01:00

22 lines
474 B
PHP

--TEST--
SplFileObject::fwrite function - writing with two parameters length < input string length
--FILE--
<?php
$file = __DIR__.'/SplFileObject_fwrite_variation_001.txt';
if(file_exists($file)) {
unlink($file);
}
$obj = New SplFileObject($file,'w');
$obj->fwrite('test_write',4);
var_dump(file_get_contents($file));
?>
--CLEAN--
<?php
$file = __DIR__.'/SplFileObject_fwrite_variation_001.txt';
if(file_exists($file)) {
unlink($file);
}
?>
--EXPECT--
string(4) "test"