A Read-Eval-Print Loop (REPL) is the console of a programming language in which we can write code line-by-line to see what it does. PHP has a REPL, although it has some limitations. Boris, a tiny PHP REPL library addresses those issues for a better REPL experience. Learn about Boris, and even see how easily it can be integrated into your own applications.
Programmers like to talk about functional programming, but if you ask any of them if they’ve ever done it, many would reply “No”. The reason is quite simple: we are taught to think in an imperative manner when we first start learning to program, in terms of flow charts and steps to be followed in the program. Challenge the way you think with this article and learn the basic concepts of functional programming.
Developers using languages like Java and C# enjoy a powerful suite of debugging tools, often integrated directly with their IDEs. But the disconnected nature of web servers and PHP IDEs prevented us from having many of the same tools available. We manually added debug statements in our code… that is, until Xdebug filled the void. See how to install and configure Xdebug, how to debug your PHP application from Netbeans, and how to view a profiling report in KCachegrind.
Most of the code we write is managed using some sort of version control system, but what about the database schemas? More often we make the changes to our development, test, and production databases manually. With a large team, it becomes difficult to share the changes with everyone. In this article you’ll see how Liquibase, an open-source tool for managing and versioning database schema changes, can help.
Learn how to create a RESTful web service using Slim, a PHP micro-framework inspired by the Ruby framework Sinatra. It’s very simple, and is easy to understand and use. Slim is well-suited for creating simple RESTful web services and comes with some minimal components like Router, Request, Response, and View.
Object Relational Mappers (ORMs) help you rapidly create applications without worrying about raw SQL queries. But the reality of working with any ORM is that using it is only simple if you already have experience using it. And if you are developing just a simple application with a few tables, using a full-fledged library is probably overkill. You may want to consider using NotORM instead, a light-weight and easy-to-use ORM library that provides an intuitive API.
Explain keyword is one of the most powerful tools at your disposal for understanding and optimizing troublesome MySQL queries, but it’s a sad fact that many developers rarely make use of it. In this article you’ll learn what the output of
EXPLAIN can be and how to use it to optimize your schema and queries.
Less code duplication more code reuse is a goal of OOP, but sometimes it can be difficult with PHP’s single inheritance model. Traits offer a work around to horizontally reuse code across different class hierarchies. They’re new in PHP 5.4, so learn about them today!
Phing is a PHP project build tool which allows you to automate performing a group of actions using a single command. Using a build tool eliminates the need to go through each step manually and the possibility for human error. In this article you’ll learn some of the basics of working with Phing.