Category Archives: Tutorials

Developing a Z-Ray Plugin 101

      4 Comments on Developing a Z-Ray Plugin 101

One of the great things about Z-Ray is the ability to extend it to display any info you want about your app. This is done by creating plugins. In this tutorial I’m going to describe how to create a new Z-Ray plugin. I’ll be supplying code snippets to insert in the various plugin files but of course feel free to… Read more »

Developing Joomla on AWS with Z-Ray

      No Comments on Developing Joomla on AWS with Z-Ray

Development in the cloud is all the rage these days and the PHP world is no exception to this rule as more and more developers are opting to move their development work to the cloud and other virtual environments (did I hear someone say Docker?) The workflow detailed below showcases only one of the many options currently available for PHP developers, but… Read more »

A new type of PHP, part 2: Scalar types

      No Comments on A new type of PHP, part 2: Scalar types

In our last installment, we talked about the benefits of more robust variable typing in PHP 7, and specifically the new support for typed return values.  That is already a big boon to the maintainability of our code, but PHP 7 goes a step further. So far, we’ve only talked about typing against classes and interfaces.  We’ve been able to… Read more »

A new type of PHP, part 1: Return types

Every significant release of PHP adds a number of new features, with one or two that really define the release.  For PHP 5.3, it was namespaces and anonymous functions.  For PHP 5.4, it was traits.  For PHP 5.5, generators.  For PHP 5.6, variadics. While PHP 7 has a large array of new improvements to make developers lives easier and involve… Read more »

Introducing Z-Ray on Azure

      No Comments on Introducing Z-Ray on Azure

This article introduces a new and cool way to develop PHP in the cloud, with Z-Ray on Microsoft Azure. You’ve probably already heard of Z-Ray, but just in case you haven’t – here’s a short recap. Z-Ray is an advanced debugging and productivity tool for PHP developers that provides info on what’s going on under the hood of your apps, in… Read more »

Debugging PHP Web Apps in a Docker Container

Debugging is an essential task of software development in any programming language. Unfortunately, the out-of-the-box experience with debugging in PHP is not always great. The “stock” PHP binaries available at php.net do not come configured with either of the two popular debug servers Xdebug and Zend Debugger. Developers are required to do additional configuration to make debugging possible with their… Read more »

Develop Your First Zend Server Plugin – Part 1

Zend Server 8.5 introduces a brand-new concept called “Plugins”. This concept is centered around the Zend Gallery – a marketplace for plugins that extend Zend Server functionality, and that were developed by, and for, the Zend Server user community. What are plugins? Put simply, plugins are pieces of code that can extend Zend Server in either, or both, of the… Read more »

Mocking Hard Dependencies in Legacy Code

I’m working on an application that’s been around for a while. It uses a lot of static methods, and often, it instantiates objects from inside methods. This makes it a pain to test, and introducing tests is part of my job. Sometimes I’m able to refactor the code so that dependencies may be injected, but many times I can’t confidently… Read more »

How to Use Composer with External Tools

Composer support in Zend Studio is quite simple. Sometimes users complain about lack of support for additional arguments e.g. for ‘install’ or ‘update’ commands. The new Zend Studio release includes support for running external programs inside your IDE. It’s called External Tools, and it’s well known to Eclipse users. It can be easily used to fill the gap between Composer… Read more »

Code Faster with the New Smart Object Operator Shortcut

Some PHP operators (e.g. ->, ::) can be quite a challenge for people who are used to different languages (like Java or C#). The new Zend Studio release introduces a new shortcut that will help developers work with: Object Operator (->) and Scope Resolution Operator (::), also called Paamayim Nekudotayim. To use it just press CTRL + . (dot) in… Read more »