News for hackers. Stuff that matters.
Re:PHP in 2020 by nkozyra on Wednesday January 22, 2020 @05:51AM (#22116349)
This is a quibble but reminiscent of the kinds of inconsistency PHP programmers are known for:

$value = $object->property ?? 'fallback if null';

$value = $array['foo'] ?? "fallback if key doesn't exists";

Re:PHP in 2020 by lemcoe9 on Wednesday January 22, 2020 @07:16AM (#22116856)
I do not understand, both of the expressions on the left-hand side are NULL, which looks like ?? is doing the same thing in both examples. A non-existent array key and a non-existent property on an object are logistically identical.
Re:PHP in 2020 by nkozyra on Wednesday January 22, 2020 @09:39AM (#22117874)
I was referring to the single-versus-double quotes.