<?php $paths = [ sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'bishop', tempnam(sys_get_temp_dir(), 'bishop'), ]; foreach ($paths as $path) { $fileW = new \SplFileObject($path, 'w'); $fileW->fputcsv(range(0,2)); assert(6 === $fileW->getSize()); echo $fileW->getSize() . PHP_EOL; $fileR = new \SplFileObject($path, 'r'); assert(6 === $fileR->getSize()); echo $fileR->getSize() . PHP_EOL; }
You have javascript disabled. You will not be able to edit any code.