Xdebug Update: December 2021 – Derick Rethans

Xdebug Update: December 2021

In this monthly update I explain what happened with Xdebug development in this past month. These will be published on the first Tuesday after the 5th of each month.

Patreon and GitHub supporters will get it earlier, around the first of each month.

You can become a patron or support me through GitHub Sponsors. I am currently 46% towards my $2,500 per month goal. If you are leading a team or company, then it is also possible to support Xdebug through a subscription.

In December, I worked on Xdebug directly for only about 26 hours, with funding being around 21 hours. Please become a supporter of Xdebug through Patreon or GitHub.

Xdebug 3.1 and further

On the first of the month, I released Xdebug 3.1.2.

It addresses a few crash bugs related to PHP 8.1 fibers, a crash bug when Xdebug can’t write a profiler file, and an issue with Xdebug’s var_dump() not using the magic __debugInfo method.

The full list of changes can be found on the updates page on the Xdebug website.

Since Xdebug 3.1.2 I have fixed a few more bugs, which are not yet in a released version. One fix pertains to the debugger generating not-well-formed XML, and another one improves performance with long strings in the debugger.

I spend most of my time in December to investigate issues that have not yet been solved. One of them turned to be a change in PHP behaviour between PHP 8.0 and 8.1. In PHP 8.0 and earlier, the $_GLOBALS[] superglobal also had a key GLOBALS, which PHP 8.1 no longer has. PhpStorm was reading values for its watch feature, from the GLOBALS context, but also added the extra (unnecessary) GLOBALS array element to read out the real variables. Fixing this in Xdebug is complex, so hopefully this will be addressed in the next version of PhpStorm itself.

The second issue turned out to be an issue with PHP-FPM, which is not strictly following PHP’s processing model. This can cause a discrepancy between PHP-FPM’s control and worker processes, where they do not agree what the value of the xdebug.mode INI setting is. Ideally this should get fixed in PHP-FPM, but there are further issues that both PHP-FPM and Xdebug probably need changes for.

Xdebug Videos

I did not create any new Xdebug videos this month on my YouTube channel. But I am working on a more thought out set of instructional videos. Stay Tuned!

If you would like to suggest a topic for a 5 to 15 minute long video, feel free to request them through this Google Form.

Truncated by Planet PHP, read more at the original (another 582 bytes)

Hello 2022! – Evert Pot

Yesterday I received an email from a reader asking ‘Are you ok?’.

It’s been nearly 8 months since the last time I wrote here. In that
last post I celebrated blogging on this website for 15 years with
some consistency, so perhaps it’s a bit ironic for that to be immediately
followed by complete silence.

The last big gap in blogging for me was in 2017, the year I joined Yelp.
This experience was so depressing, every day I was done work I had no
creative energy left for anything else.

2021 was a bit different though. 2 years back I started a software
development agency
, which grew from 2 to 5 people in the last year.
The stakes have increased quite a bit, and it’s taken up a lot of my
emotional reserves.

I’ve also made the mistake of not taking any vacation all year. There was
just not much gas left in the tank. This is so stupid. Less time off doesn’t
result in more productivity. I know this, but the last 2 years there’s been
little travel or activities due to lockdowns and restrictions. Every day
looks the same and it kind of just flew by.

Over the last holidays I’ve taken an actual break though, and have since
started several new projects and buzzing with new ideas. I’m still motivated
to work on Curveball and Ketting (we use it every day for almost
every customer!), and I’ve also started a series of live streams in which
I build a Time Tracking application with Hypermedia on twitch.tv/evrt3.

If this sounds interesting, the first few episodes are up on
my youtube channel, but I’ll share more on this blog later.

I’m also preparing for a tech talk on January 19th for Toronto JS. It’s
online and free!

So am I ok? I think I am? This year is off to a good start. I just have to
make sure I don’t forget to take it easy.

Happy stupid new year! I hope it sucks less!

Advent of Functional PHP: Review – Larry Garfield

Advent of Functional PHP: Review

Over the last few weeks, I’ve been following Advent of Code 2021, using Functional PHP as an approach. It’s been a fun and educational process, at least for me and apparently for a few other people, at least given how popular the articles have been.

For reference, the full list of articles in this series is here:

Larry
29 December 2021 – 7:10pm

Advent of Functional PHP: Day 10 – Larry Garfield

Advent of Functional PHP: Day 10

For the 10th Day of Advent of Code, we’re asked to solve a matching braces problem. This is a common parser exercise, but it’s made a bit more complex in this case by using multiple types of braces. Specifically, we’re handling a series of lines that contain ( and ), but also < and >, [ and ], and { and }.

The story jazzes it up as being the code of our submarine's navigational computer, which consists entirely of braces in a sort of eldritch horror version of brainfuck, but that's mostly just a distraction.

Larry
24 December 2021 - 7:14pm

Advent of Functional PHP: Day 9 – Larry Garfield

Advent of Functional PHP: Day 9

Submitted by Larry on 23 December 2021 – 11:21am

Day 9 of this year’s Advent of Code revolves around grid interpretation. Specifically, we are given a grid of numbers and want to find the low points, that is, the numbers that are smaller than any of their orthogonal neighbors. (We’re told to ignore diagonals in part 1.)

After finding the low points, we need to do a bit of math on each one, and add them up. As usual, this last step is mostly just to produce a single verification number at the end. That part is easy as usual, but how do we find the low points?

Continue reading this post on PeakD.

PHP 8.1 lays new ground on Platform.sh – platform.sh

Just days after its official release, we are thrilled to announce the immediate availability of PHP 8.1 for all Grid plans projects. The new PHP foundation releases a new main version every year at the very end of November, and It’s some kind of early Christmas for us developers and application makers.
Sparks and acceleration PHP 8.1 comes with many new and long-expected features such as Enums, Readonly properties, First-class callable syntax, and new in initializers.

Advent of Functional PHP: Day 8 – Larry Garfield

Advent of Functional PHP: Day 8

Advent of Code Day 8 was, to put it mildly, a pain in the ass. There’s a couple of reasons for that. It’s a naturally tricky problem, it’s hard to genericize, and it’s explained fairly badly. It took a while but with some help from others I was finally able to figure out (and refactor to) a good, functional solution to it. So let’s dive in.

The problem boils down to one of encryption. Our input is several lines that all look like this:

acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab | cdfeb fcadb cdfeb cdbaf

Where each letter corresponds to one segment in an LED display for a number. Each number appears once on the left side, which is enough for you to figure out what letter corresponds to what segment. Then we need to use that knowledge to decode the numbers on the right and figure out what the number is.

Larry
20 December 2021 – 10:06am

Ep#366 – Interview with The PHP Foundation – Voices of the ElePHPant

About

Listen as hosts Cal Evans and Khayrattee Wasseem talk with Sara Golemon, Joe Watkins, and Sebastian Bergmann about the newly formed PHP Foundation.

Transcript

Ep#366-Interview-PHP-Foundation

This episode is sponsored by
RingCentral Developers

The post Ep#366 – Interview with The PHP Foundation appeared first on Voices of the ElePHPant.