PHP Class Customization trait
I’ve written a trait to help with customizing classes behaviors. For example if you have a class A with method getName() but in this method you want to check whether you want the full name to be returned or just the last or first name,…
PHP: How to get Current Date
There are multiple ways which can be used to get PHP Current Date, I’m going to start with the simplest way. the date will return a string
$Date = date('Y-m-d H:i:s');
echo $Date; // Will Output the current date in Y-m-d H:i:s format.
According to PHP Manual, date() takes two parameters, the first one is format the second one is…