handleBom example

$this->seek($resource$offset);
    }

    /** * @param resource $resource */
    private function readSingleRecord($resource, int $offset): ?array
    {
        $this->seek($resource$offset);

        while (!feof($resource)) {
            $this->handleBom($resource);
            $record = fgetcsv($resource, 0, $this->delimiter, $this->enclosure, $this->escape);
            // skip if it's an empty line             if ($record === false || (\count($record) === 1 && $record[0] === null)) {
                continue;
            }

            $record = $this->mapRecord($record);

            // skip empty             if ($record === null || array_filter($record) === []) {
                continue;
            }
Home | Imprint | This part of the site doesn't use cookies.