PHP

A Guide to Date and Time Functions in WordPress and PHP

When managing dates in WordPress, it’s crucial to use the right functions to avoid timezone issues. Here’s how some commonly used functions behave, particularly in GMT+6. Setting the Environment for Examples Examples of Date Functions 1. wp_date(): WordPress Date Formatting in Site Timezone (GMT+6) The wp_date() function returns the date in the timezone configured in …

A Guide to Date and Time Functions in WordPress and PHP Read More »

Learn PHP Namespace and Class Loader easy way

Let’s take index.php file first. Now time for the autoload.php file. This is very important file which actually loads the classes dynamically. Let’s setup a class. The file also imports another class. This project actually gives an idea of how the classes can be loaded dynamically. Full source code can be found in this Github …

Learn PHP Namespace and Class Loader easy way Read More »

Scroll to Top