PHP processes more Excel files than any language except maybe Python. Payroll exports, inventory imports, financial reports, data migrations. If your business runs on spreadsheets (and it does), your PHP app touches them constantly.
The standard approach is PhpSpreadsheet: a pure-PHP library that parses XML, builds an in-memory object graph, and promptly devours your server's RAM. It works fine for small files. It falls apart the moment someone uploads a 50,000-row export from SAP. (Don't ask me how I know. 😢)
php_excel takes a different path. It's a PHP extension that wraps LibXL, a commercial C/C++ library purpose-built for reading and writing Excel files. Unlike most alternatives, LibXL handles both modern xlsx (Office 2007+) and the legacy xls binary format (Excel 97-2003), so you don't need separate codepaths for old and new files.
Instead of parsing XML in userland PHP, every cell read and write is a single C function call. In my benchmarks it's 7-10x faster than PhpSpreadsheet, and its memory f...
In the PHP community, "persistent connections" are often treated like a dark art; powerful, but prone to blowing up in your face. We've been told they cause "Too many connections" errors, stale data, and dangling transactions.
The truth? In high-traffic environments, persistent connections are your best friend. If you understand how PHP internals and networking flows actually work, they are the single most effective way to slash latency and stabilize your database.
The "Connection Tax": What You Pay Every Request
Every time you call new PDO() or mysqli_connect() without persistence, your server begins a grueling marathon. Before a single byte of SQL is executed, the following must happen:
DNS Resolution: Converting db.example.com to an IP. Even with caching, this is a network hop.
TCP 3-Way Handshake: The client and server exchange SYN, SYN-ACK, and ACK packets. This requires a full round-trip (RTT)
SSL/TLS Negotiation: If you use encryption (standard for cloud DBs), this is...
My slides from the PHP True North Conference talk on Browser Performance are available here.
Thanks to everyone who attended and the engaging question.
My slides from the True North PHP Conference on the topic of "Business Logic Security" are now available for download here:
Slides
My slides from the "Nginx Tricks for PHP Developers" talk at the Toronto PHP User Group are available for download here:
https://ilia.ws/files/nginx_torontophpug.pdf