PHP Abstract Class

This post is related to abstract classes in PHP and will be updated with related information as time passes. Let me know in comments if you have any feedback, suggestion, correction or query related to this topic and content discussed here. Can Abstract Class have Private methods? I was reading a blog where someone commented […]

Preg_replace vs str_replace

I’ve been looking for benchmark tests that compare preg_replace with str_replace, but none was satisfying my exact situation. My exact situation was, that once the page is completely loaded, all thousands of lines of html code, and then run that code through my function to replace the substring in it with mine. Actually converting all […]

PHPMailer – Tips and fixes

This post will cover various common issues encountered with PHPMailer and how to resolve them. It will also include various tips to improve its usage. I will keep updating this post with content related to PHPMailer as it comes along. Set different but single reply-to email address You can provide a different reply-to address to […]

KISS code

I’ve seen numerous people, doing simple things in amazingly complex way! As they say, programming is not typing, it’s thinking. Maybe it’s hard to think for a few minutes instead of coding for many more minutes over the same thing, in a bad way? In this article, I’ll keep adding some KISS (Keep It Simple […]

HTML2PDF issues

I was working with one of the clients site where the invoices were being converted to a pdf using mpdf library. However, as usual, there were errors encountered, so I decided to make a post related to html to pdf conversion errors and compile all the html2pdf errors in one place. This list will keep […]

MySql issues

This page will list some of the common mysql related issues and how to solve them. If you’re having any issue not listed here, please let me know through comments and I’ll try to solve them for you. PhpMyAdmin:¬†import file size too large I was trying to import a phpmyadmin file related to one of […]

PHP 7 – 5 things you need to know

PHP 7 candidate has been released and it has some cool improvements to show! Some argue that there wasn’t a need to release it currently as most of the improvements it provides were already quite possible through various ways in previous versions too. Lets see some of the things about PHP 7 and how it […]

APC vs Memcached, which one is best

The debate about the best never ends. Today one might be the best, tomorrow some other one! Same goes with caching plugins too. Today a member asked in our group that which one of the caching plugin is best, APC or Memcached. Before going into detail let me clarify that memcache is different from memcached […]

Enable PHP short tags on nginx and apache

First of all, if you need to turn on short tags on your nginx or apache based server (linux or mac or windows or any other) for just one single tag, please do yourself a favor and change the single <? it to <?php However if you need it turned on for sure, then continue […]

Submit html code via input to WordPress options correctly

I’ve been working on a plugin and it needed to allow users to¬†save html code as options. However while trying to do so, php (or WordPress) would automatically escape the submitted code with a backslash (\). I tried figuring out why and where it was happening and it turned out to be added right at […]