Wait... is there no way to install 7.4 under 22.04? I just need it temporarily so I can upgrade ...

Is it just me, or does not have any non-blocking I/O functions?

(Fortunately, we've come up with a work-around for the IMAP issues, for now, so I can get back to upgrading .)

jobs increasingly seem to want experience with a framework, preferably Laravel.

I've been too busy working with MediaWiki and writing my own framework to learn another one. Am I doomed?

Disemployed in Durham

P.S. Do I really have to learn or am I also additionally doomed because I doan wanna?

Once again, HTYP is here to fill all your missing-documentation needs. 🎉

In today's episode: use syntax, specifically in the sense which applies to traits (not the other sense which applies to namespaces)

I figured out some things this morning about function-variables in .

You're welcome.

Wow... is there really no clean way to detect an improperly serialized string in ?

I tried the @ technique, and it still throws a fatal error.

The only solution I can find seems to be basically reverse-engineering the format and checking for likely issues before trying to parse it: stackoverflow.com/questions/13

As a result of this, I have now used code from StackOverflow absolutely verbatim. Just yesterday I told @eryn I had managed to avoid ever doing that... :D

I'll take consolation from the fact that I'm doing it as a kluge around a bug in rather than in my own code.

I have decided that I will refer to "exceptions" as "hissy fits" in my documentation.

It's really kind of irritating that native exceptions don't seem to ever set a numeric code, making it more difficult than it should be to detect specific error conditions -- especially when part of the error message is a variable, as in

Class '[name of class]' not found

I'm going to have to use regex for this. It should just be a numeric code, but the getCode() for this error is 0, as it is for pretty much all of them as far as I can tell.

Has anyone out there ever successfully set up step-through debugging in ? Needing it more and more...

Would prefer if it could be used with Kate, but I'll accept KDevelop or any other FOSS editor...

Oh, so you can do abstract static functions in . Why did I think that wasn't a thing?

Thinking about it... in , why are interfaces and traits even different things?

Everything you can do with an interface:

  1. declare functions
  2. extend another interface
  3. "implement" it in a class
  4. use it as a parameter type

Item 1 (functions)

This is functionally the same as defining an abstract public function in a trait.

Item 2 (extend)

This is functionally the same as a trait use-ing another trait.

Item 3 (implementation)

This is functionally the same as use-ing a trait that consists entirely of abstract public functions.

Item 4 (parameter type)

This is the one thing a trait cannot do -- but I don't understand why it was done that way.

Note: this seems related to my trait implements wishlist item from earlier. At first I thought that they might be in conflict, but on looking at the syntax in more depth, I don't see how. A trait that uses/extends another trait is also declaring abstract functions in that trait as an implementation requirement.

Putting both of these suggestions together would both simplify the language and make it more powerful, I'd think.

experts: is there any non-destructive way to tell if a variable contains a reference rather than a literal value?

very mild PHP gripe 

array_key_exists() is just backwards, that's all. The array should come first, and then the index. Why, .

I keep forgetting to include the keyword function when declaring functions in . Does this mean my brain is pining for C++ or something? 🧠

7 was giving me the ever-popular blank-screen look, and it turned out to be entirely due to a break; which had somehow ended up in the wrong place.

That shouldn't be a showstopper, guize. :kestraglow:

There needs to be a companion to the final keyword in .

Background: The "final" keyword indicates that a method cannot be overridden in a child class.

Wish: There needs to be a first keyword to prevent accidentally creating a method ancestor which might get completely bypassed because a descendant doesn't call parent::[method] because it doesn't expect one to exist.

Either that, or a way to allow calls to parent::[method]() even when there's no method ancestor.

...or else a way to define a method such that each generation gets called automatically -- except that takes away sequencing control, which would cause problems.


You can get a list of an object's methods with get_class_methods(), but it would be really really nice to get additional info along with each listing -- mainly the filename and line where the method is defined.

You can make throw an error if a function is called without expected arguments, but not if a function is called with more arguments than expected.

I think maybe fixes this by allowing "void" as an argument type? I don't yet have a system with PHP8 on it, though, so I don't actually know.

If it doesn't, then this is a .

Show older

Woozle Hypertwin's choices:


On the internet, everyone knows you're a cat — and that's totally okay.