PHP Design Patterns

Explore some of the most widely used design patterns: singleton, facade, decorator and factory.

Posted by on 30 October 2015 | 4:55 pm

Create a Remember Me Feature in PHP

The "remember me" feature on user login forms (long-term persistent authentication) is one of the most common and convenient web authentication features. It allows the user to be constantly authenticated in the application without having to enter username and password in each session. The feature is based on cookies and handling cookie data in PHP. Since we are talking about authentication, security is important and any possible security issues and solutions will be covered in this tutorial.

Posted by on 16 October 2015 | 3:35 pm

Top Five Databases to Use with PHP

Although MySQL is the most commonly used database software in web applications, there are many other database systems that are also popular and provide good solutions in certain use-cases. In this article, we will discuss these systems and their advantages and disadvantages.

Posted by on 30 September 2015 | 11:58 am

Converting Dates Between Time Zones in PHP

Every developer has to deal with it at some point in their career. It is always there. It is persistent, relentlessly ticking away and eating productivity. It keeps track of when things happen, and can cause you pain when trying to work with it. What is it? Time (and time zones in particular).

Posted by on 17 September 2015 | 1:53 pm

Working with PHP and MongoDB

Learn how to install the MongoDB server and the PHP MongoDB driver for them to work well together. You also saw how to use MongoDB CRUD operation from PHP, using the implicit MongoDB database and a newly created database.

Posted by on 31 August 2015 | 3:49 pm

Creating Framework-Agnostic PHP Packages

One of the common problems with PHP used to be that if you chose to use a particular framework, you were only able to use the libraries and plugins that are made specifically for that PHP framework. It was difficult to switch the frameworks or to re-use the code between frameworks. However, PHP has experienced major changes recently. Composer, a package manager widely used by PHP developers, and latest generation frameworks, such as Laravel and Symfony, have enabled PHP developers to create framework-agnostic packages.

Posted by on 20 August 2015 | 4:35 pm

PHP Explode Tips and Tricks

The PHP Explode and Implode functions are both powerful tools to have in your back pocket when developing applications. They can save you a lot of time, lines of code, and unnecessary looping if used correctly.

Posted by on 30 July 2015 | 3:17 pm

10 Productive PHP Tools for Testing and Debugging

PHP developers have a great deal to choose from when it comes to testing and debugging tools, and in this article I'll highlight 10 of my favorites.

Posted by on 28 July 2015 | 12:41 pm

Implementing Two-Factor Authentication in PHP

Two-factor authentication is a type of authentication that "provides unambiguous identification of users by means of the combination of two different components." These authentication components could be something that the user knows, something that the user possesses or something that is inseparable from the user. In this tutorial, you will learn how to implement two-factor authentication in PHP.

Posted by on 15 July 2015 | 3:28 am

Connecting PHP Apps to Google Cloud Storage

In this article, Gigi Sayfan shows you how to take advantage of Google's Platform as a Service (PaaS) in order to create a scalable, highly available and secure PHP web application.

Posted by on 30 June 2015 | 4:06 am

How to Create a Secure Websocket Connection

WebSocket is a relatively new technology that enables a persistent connection between client and server over TCP protocol. In other words, it allows bi-directional socket connections to a server, where both server and client can send the data at any time. This article will focus on WebSocket's security issues and possible solutions to its vulnerabilities.

Posted by on 17 June 2015 | 2:58 pm

Migrating Legacy Applications to AngularJS

John Barlow admit its, he was a little afraid of AngularJS at first. He had seen other frameworks that were similar and immediately discounted this as "just another JavaScript framework" — until he used it. In those short moments he discovered that AngularJS is magical, and decided he must use it for all new projects and migrate the old projects.

Posted by on 14 May 2015 | 1:33 pm

Dependency Injection with the Silex Micro-Framework

Silex comes packed with its very own built-in dependency injection container called Pimple (this is also a standalone dependency injection container) which is a very lightweight, yet powerful, container. Let's delve into how it works.

Posted by on 30 April 2015 | 12:31 pm

Overview of the Silex Micro-Framework

Usually a micro-framework leaves pretty much everything up to you. You can do with it as you please and mostly you can get away with anything. Unlike a regular, full-stack framework, a micro-framework will not dictate much in terms of where to put things or how to do things.

Posted by on 10 April 2015 | 2:02 pm

Counting Facebook Likes and Twitter Tweets in Your App

Learn how to fetch the data from Facebook and Twitter, how to optimize the connection to these web sites and how to automatically update the data.

Posted by on 26 March 2015 | 2:59 pm

Working with the PayPal API

PayPal recently introduced a new RESTful API that is more convenient and more powerful than the previous version. Learn how to integrate your PHP application with the new PayPal API.

Posted by on 9 March 2015 | 11:55 am

More PHPUnit Helpers

In my previous article, I expanded a few ideas around test helpers and how to use setUp() and tearDown(). However, we still stayed in the realm of things built in to PHPUnit. Here, I want to expand on a helper function I include in most of my main testing classes that allows for the concept of setUp(), but grants a bit more flexibility.

Posted by on 23 February 2015 | 3:32 pm

Working with PHPUnit Test Helpers

introduction to PHPUnit and how to do object mocking. While necessary, sometimes all of the setup work can become tedious for large projects. In this article, I hope to show how some helper methods can make test writing much easier and faster.

Posted by on 30 January 2015 | 12:00 pm

Getting Started With Laravel Homestead

Laravel follows a slightly different approach to PHP development. Using ideas usually found in the .NET environment, such as Facades, and sporting an Inversion of Control Container, Laravel claims to be the future of PHP. Whether or not this is the case is too early to tell, but it certainly is popular.

Posted by on 15 January 2015 | 12:16 pm