Author: chris
Async/Await with Try/Catch
Wrap awaitable calls in try/catch for ergonomic error handling.
Author:
chris
Fetch API GET Request
Modern Fetch with async/await, response status check, and JSON parsing.
Author:
chris
Basic Session Handling in PHP
Start a session, store a value, and read it on the next request.
Author:
chris
URL Encode and Decode in PHP
rawurlencode is RFC 3986; urlencode uses the older application/x-www-form-urlencoded.
Author:
chris
Parse argv in a PHP CLI Script
Hand-roll CLI parsing using \$argv when getopt is overkill.
Author:
chris
Send Email with mail() in PHP
Fire-and-forget mail via the built-in mail() — fine for low-volume.
Author:
chris
Recursive Directory Iterator in PHP
Walk a tree with RecursiveDirectoryIterator + RecursiveIteratorIterator.
Author:
chris