Posts marked with “php”

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.

 

Internal Apparatus: Patterns in the Code

by ·

0
 

The PHP compiler source code includes many patterns that can be frustrating and intimidating, because they are so different from typical PHP code, until we understand the structure and context. C’s preprocessor has a significant role in these unfamiliar patterns. We look at several of these patterns in the compiler’s PHP Array implementation.

 

Editor’s Desk: PHP 7.4 RFCs, Symfony Speaker Workshop, Call for Writers

by · March 18, 2019

0
 

Editor-in-Chief Oscar Merida records a mini-episode. In this first one, he looks at some RFCs submitted for PHP 7.4 and 8.0, and a new tool for detecting memory leaks with PHP Unit.

 

Internal Apparatus: Hash Table Collisions

by · March 4, 2019

0
 

We continue our deep dive into how PHP implements arrays as hash tables. We’ll see how the collision chain works. We’re not ready to dig into the C implementation just yet, so we’ll see how to build and rebuild the hash table using PHP code. This month we’re learning how PHP arrays are stored and […]

 

Education Station: Explicit is Better Than Implicit

by ·

0
 

The argument over strict typing is nothing new in PHP. When the PHP 7.0 release was under development and the idea of scalar type hinting came up, there were developers on all sides with opinions on how it should work. While PHP 7.0 could introduce backward compatibility breaks, introducing strict typing had the potential to […]