Posts tagged with internals

Join 9,000+ developers

Every month, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

No spam. Unsubscribe anytime. You can also follow me on X.

How to compile PHP from Source

thephp.website

Knowing how to compile PHP will open one of the few doors necessary for contributing to the PHP language. Once you get familiar with this it will be much easier for you to contribute in many ways such as running tests and uploading reports, writing new tests by yourself and bug reporting/fixing.

Read more [thephp.website]

PHP 7.4 FFI: What you need to know

jolicode.com

FFI lets you include external libraries written in other programming languagues in your PHP code.

PHP Foreign Function Interface, or FFI for fans, is a PHP extension that allows you to include with ease some externals libraries into your PHP code. That means it’s possible to use C, Go, Rust, etc. shared library directly in PHP without writing a PHP Extension in C. This concept exists for years in other languages like Python or Go.

Read more [jolicode.com]

Build your own React

pomb.us

In a very cool post, Rodrigo Pombo explains the internals of React by rewriting it's core from scratch.

We are going to rewrite React from scratch. Step by step. Following the architecture from the real React code but without all the optimizations and non-essential features.

Read more [pomb.us]

A Look At PHP’s isset()

medium.com

Liam Hammet wrote a good blogpost on the isset language construct.

Let’s take a look through how isset behaves and what’s so special about it. Even if you’re a veteran PHP developer, hopefully, you’ll pick up something new here.

Read more [medium.com]

Parallel PHP: The Next Chapter

Joe Watkins, core contributor and pthreads author, is working on a new threading API for PHP called parallel. It might be a while before it is released.

Recently, I set to work on a new threading API, named Parallel, it is not an exact clone of any existing threading API, it is an API focused on being simple and hiding the complexity inherent in utilising parallelism in your application, it is also focused on being forward compatible with the JIT, for that day when we can actually execute machine code in userland and in parallel.

https://blog.krakjoe.ninja/2019/02/parallel-php-next-chapter.html

EDIT: meanwhile a stable version has been released. You can find it in this repo on GitHub.

Read more

Find Segfaults in PHP like a boss

jolicode.com

Grégoire Pineau explains how you can find the source of a segfault in PHP.

Sometimes, a segfault happens, but you don’t know where, and your PHP installation does not have tools to find it. Or sometime, you think PHP is hanging, but you don’t know where. You may use xdebug, but you don’t want to click so many times on the « next call » button.

Read more [jolicode.com]

Notes on PHP RFCs, and topics that occur repeatedly on PHP internals

github.com

Dan Ackroyd maintains this interesting repo on GitHub with thoughts on why some PHP RFC's are not implemented yet. High on on my wishlist: Briefer closure syntax and Generics

There are some notes on PHP RFCs, why some were declined, and what others might need for them to be implemented. The purpose of these documents is to avoid information from being lost and to try to avoid conversations needing to be repeated multiple times on PHP internals.

Read more [github.com]