Learn about the different ways to get the current date and time in PHP and some additional considerations when working with time in PHP.
Tag: PHP Quick Tips
Learn how caching improves app performance and how to implement it in PHP through output buffering, caching functions, and database storage.
Learn the basics of exceptions in PHP, how to use throw, try and catch effectively, and how to write your own custom exceptions.
Learn some simple functions in PHP for trimming whitespace from strings, when you might need to use them, and a pitfall to watch out for.
Learn how to hash a password in PHP using the password_hash() function, why hashing is important, and how hashing differs from encryption.
Learn how to check if a variable is set in PHP, what its values are, and the differences between the isset, is_null, and empty methods.
Learn the basics of timezone usage in PHP, and how to make the best choice of the comprehensive range of functions PHP offers.
In this quick tip on PHP error reporting, we review the tools in PHP for handling errors in a controlled way to save hours of debugging.
Learn about the three basic, native PHP functions for quickly opening a local file, reading data from it, or writing data to it.
Learn the difference between PHP validation and sanitization and how to use filter functions, to ensure your PHP apps are reliable and secure.
Younes presents Eloquent Observers - a method of subscribing to changed on models and having those models notify all subscribers of changes. Check it out!
Claudio introduces us to a new PHPCS standard - PhpCompatibility. This standard checks your code for compatibility with past and present versions of PHP!
Laravel has the option to bind models to routes, for easy auto-fetching. See how they can be configured, and how to switch to UUID instead of primary keys!
A solution to the PayPal IPN Simulator "INVALID" problem - where the verification message always returns invalid, even if everything seems fine
A couple of helper methods for quickly and effectively passing larger numbers of variables to views from your controllers
Andrew explains how to perform database-related tests in a Symfony app much faster - with a disposable in-memory SQLite database, avoiding any bulky mocks