PHP is quite stable

In the late 90s, I wrote a PHP library to create charts. (I worked for an Internet stock broker, you see.) I was reminded of this because I found a four year old pull request to make it work under PHP 7.4.

Yeah yeah yeah, I know that “[.]” is an eccentric way to say “match one full stop”, but I can never remember whether you have to quote the backslash since it’s in a string (like in Emacs Lisp) or you don’t have to.

(Apparently the rules for backslash in PHP is that it represents itself unless the next character is a ” or a \ or something.)

But! Anyway. PHP is now at 8.4, but I only had to change three things:

1) ereg -> preg. Very annoying change, and apparently mostly pointless?

b) You can’t say $a = &$b any more (assignment by reference)?

IV) The class constructor used to be a function with the same name as the class. But now the function is called __construct, which I’m sure was a very important and vital change.

But overall… it’s pretty amazing how little the PHP people have broken over the years.

(Oh, there’s one more thing that doesn’t work, but that’s not the PHP people’s fault — by default in Debian, you can no longer use Type1 fonts in PHP under Apache, because it’s been deemed Unsafe. Because somebody can put Dangerous Fonts into the root-owned font directory and then er get er root access because of segfaults and stuff. IT”S UNSAFE!!! YOU DON”T WANT ROOT ACCESS WHEN YOU HAVE ROOT ACCESS11!)

In any case, if you want a 90s-era PHP library to chart some numbers, you can find it here. And the manual is here.

Leave a Reply