Easy PHP debugging with Kint

My standard debugging tool when using PHP is xdebug. Pairing xdebug with Komodo gives me a very productive environment for building PHP applications. However, testing an application code on a hosted server can be many times frustrating as one has only the print_r and var_dump functions at our disposal. What I need is a library that I can easily install on the server and start using.
(more…)

Read More

Constructing hard regular expressions with VerbalExpressions

Most newbie (and some seasoned) programmers have difficultly constructing Regular Expressions. Many a times one needs to create a Regexp quickly to test a a particular piece of code. However, not being comfortable withe Regexps can be a problem. VerbalExpressions is a PHP library that enables you to construct regular expressions using natural language like constructs. Think of it like a DSL for building Regexps.
(more…)

Read More

Pretty error display for PHP

One of my pet peeves regarding PHP is the terseness of the error messages it throws. Not that they are unhelpful; the major headache it that one has to open the source file at the given error location to check for problems. Also the complete system context (the PHP system variables, cookies, session etc.) is not easily available.
(more…)

Read More

Avoiding implicit default column values in MySQL

In a non-strict MySQL server mode, columns with NOT NULL and without any DEFAULT values are given implicit default values based on their data types. This can be useful when no values are explicitly set for them during a SQL INSERT. However this can be recipe for disaster if the MySQL server is later configured for strict mode. The following are the general rules governing implicit default column values:
(more…)

Read More

StrikeIron sales tax addon for cs-cart

CS-Cart is one of the premium shopping platform for building ecommerce sites. As with any ecommerce solutions CS-Cart includes various tax features. However, one important feature it lacks is sales tax. For a recent client work I needed to integrate the sales tax api from StrikeIron, which provides a cloud-based Data Quality Suite including email verification, address verification, phone validation, phone append, and sales tax calculation solutions. For those who may be interested in implementing sales tax for their CS-Cart installation I’ve provided the addon for download below. A sample screnshot of the tax screen is given below.
(more…)

Read More

Adding actions to Gmail using Schemas

Recently, Google introduced Schemas in Gmail messages to allow developers to deliver a more interactive email experience integrated with their web app. Schemas in emails can be used to represent various types of entities and actions. Email clients that understand schemas, such as Gmail, can render entities and actions defined in the messages with a consistent user interface. In the case of Gmail, this means that the emails can display quick action buttons that let users take actions directly from their inboxes, essentialy allowing them to tie their web app with Gmail for a more integrative experience.
(more…)

Read More