
Excel
Reading Excel Files in PHP With PhpSpreadsheet Efficiently
Read and write Excel in PHP with PhpSpreadsheet: load sheets, typed cells and dates, read filters and chunks for memory, exports and formula injection.
7 min read
Tag
5 posts

Read and write Excel in PHP with PhpSpreadsheet: load sheets, typed cells and dates, read filters and chunks for memory, exports and formula injection.

json_decode in PHP 8.5 returns null on bad input unless you throw. Arrays or objects, big integers, depth 512, flags and the list versus object trap.

Read XML in PHP 8.5 with SimpleXML, DOMXPath and XMLReader, avoid the boolean cast trap, handle namespaces and read parse errors with libxml_get_errors.

Read CSV in PHP 8.5 with fgetcsv and SplFileObject: the $escape deprecation, a backslash that swallows the file, str_getcsv traps and the BOM.

Parse untrusted XML in PHP 8.5 and Node 24: why LIBXML_NOENT is the dangerous flag, what DOMDocument does, and how two Node parsers behave.