Posts marked with “internals”
finally{}: Awkward Conversations
When we talk about long-term planning for our code, we often mean making sure that it can handle increases in traffic as usage increases (if we are lucky). We also usually mean making sure the code is flexible enough to handle the new technology and client requests inevitably coming its way. These are great things […]
About PHP’s Compromised Git Commit
PHP internals contributor Sara Golemon answers questions from a panel of php[architect] and PHP Ugly contributors about the recent git compromise that affected the PHP project and what they’re doing about it. You can also watch a video of the roundtable with Sara. More on This From Rasmus Lerdorf: It wasn't, but we caught it […]
Internal Apparatus: A Walk Through the Generated Code
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: Patterns in the Code
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.
Internal Apparatus: Hash Table Collisions
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 […]
Internal Apparatus: How PHP Works: Show Me the Code
We all use PHP; it’s open source, which means anyone can take a look. However, it’s not as easy as with the various PHP frameworks, because PHP is written in C and makes heavy use of C preprocessor macros. We’ll see it’s relatively readable once we know how and where to look.
A Journey Through PHP Internals
In everyday work, it’s easy to forget just how many things are happening under the hood, how many concepts are abstracted away to make our code run and make it run efficiently. It wasn’t always the case—at first, there were languages we now call “assembly languages”—designed to faithfully represent what the CPU will execute, and […]
Internal Journeys – October 2018
You may be used to helpers and frameworks which rapidly generate new code at the press of a button. However, understanding what these tools are doing is immensely valuable when they don’t work or you need to develop a lean solution. This month, we’ll investigate how things work under the hood to find new tools […]
The Future Of PHP
There’s been a significant decision reached recently concerning the future of PHP, in particular for the development of PHP 6. Yesterday, the PHP Internals group reached what seems to be a tentative agreement to postpone implementation of a Unicode PHP engine, and instead focus on developing PHP 5.3 as the main PHP development branch.