Everyday library

Five parts of the standard library that a page calls every day: the string helpers, DateTimeImmutable, JSON, the file functions, and the error messages that point at the line to fix.

025 Everyday string functions str_contains, str_replace, trim, explode, implode and sprintf in short examples Open 026 Dates and time time, date and DateTimeImmutable: format, modify, compare Open 027 JSON in PHP json_encode and json_decode with error handling and a tiny response Open 028 Reading and writing files file_get_contents, file_put_contents, is_file and __DIR__ with safe examples Open 029 Errors: read, reproduce, fix show errors locally, log them, catch exceptions, fix real cases Open

Lessons