Posts marked with “php”

finally{}: 25 Years of PHP

by · August 2, 2019

0
 

PHP was released in the fall of 1994, making 2019 the 25th anniversary of PHP! We’ve certainly come a long way from the early days of the web. I’m not sure how many people reading this were around back then, but I was. Things were not pretty back then.

 

Internal Apparatus: Generated Singletons

by ·

0
 

This month we study the Singleton Design Pattern, but with a twist. We start with a correct implementation but get it wrong by refactoring. We’ll examine the PHP generated code, each step of the way, to understand what went wrong. We’ll observe at least two reasons the Singleton Design Pattern is now considered an anti-pattern. We’re preparing to learn useful variations next month by seeing precisely how it works under the hood.

 

finally{}: Semver, PHP and WordPress

by · July 2, 2019

0
 

Recently there was a big announcement that with WordPress 5.2, that they would be updating the minimum required version of PHP to 5.6. That’s a huge deal, but as can be expected, a vocal minority of the PHP community immediately erupted in anger

 

Internal Apparatus: A Walk Through the Generated Code

by ·

0
 

The PHP compiler/interpreter reads through our PHP code and produces an intermediate form. PHP’s virtual machine then interprets this intermediate form. PHP’s “generated code” feature allows us to walk through this intermediate form, better understanding exactly what PHP does with the software we write. We’ll begin with a three line example, observing the generated-code changes […]

 

Internal Apparatus: Memoization

by · June 5, 2019

0
 

Memoization is another form of memory use. I see it regularly used for improving application performance, but it’s also used to improve compiler performance. To learn the concept, we’ll use a PHP project with database tables, then look at other ways to use the technique.

 

Education Station: Data Structures, Part Two

by ·

0
 

Last month I talked about how, despite PHP arrays being one of the nicest things about the language, there were times where real data structures could help. There were various ways to use arrays as more “traditional” data structures, as well as the options provided by the Standard PHP Library, or SPL. If you can […]

 

finally{}: The State of PHP

by · May 2, 2019

0
 

I’ve spent a while now working on my seven deadly sins series of articles, and so it’s been a while since we’ve stepped back to look at PHP itself. Where are we as a language, and as a community?

 

Internal Apparatus: Memory Abstractions

by ·

0
 

We normally don’t care about abstractions in software, because they exist to hide details we shouldn’t need to care about. However, sometimes, we do need to know the detail. An essential part of how PHP works involves memory management. This month we’ll see new ways to think of memory itself; we’ll also introduce a learning tool we’ll be using in upcoming articles. We’ll be simulating an ancient mainframe computer, and its hard-wired operator console, using modern text messages.

 

Education Station: Data Structures, Part One

by ·

0
 

I’ll admit, one of the best things I love about PHP is that I don’t have to deal with all sorts of different ways to deal with data. At the base of the language we have nice primitives like strings, integers, floats, and Booleans, and we also have one of the most flexible structures known to programmers—the PHP Array. The array itself wears many hats. If you are coming from other languages, you have to think about the structure of ordered data in a few different ways. The reason for this tends to deal mostly with how we need to represent data and how we manipulate data. Different data has different requirements.

 

The New Frontend Fundamentals

by · April 3, 2019

0
 

Eventually, we expose the services offered by the PHP-powered APIs we build to users. Unlike a decade ago when we could count potential client applications on one hand, today the potential client can be anything. But for most people-facing applications, it still means HTML output with images and CSS. In this issue, we have articles to help keep your CSS know-how up to date, your twig components re-usable, and your dynamic front-end code quick.