2 SPL: SplFileObject truncate tests
5 #Hackday Webtuesday 2008-05-24
9 set_include_path(dirname(__DIR__));
11 $path = __DIR__.DIRECTORY_SEPARATOR.'fileobject_005.txt';
14 $fo = new SplFileObject('tests'.DIRECTORY_SEPARATOR.'fileobject_005.txt', 'w+', true);
15 $fo->fwrite("blahlubba");
16 var_dump($fo->ftruncate(4));
19 var_dump($fo->fgets());
22 $fo->fwrite("blahlubba");
27 $path = __DIR__.DIRECTORY_SEPARATOR.'fileobject_005.txt';