by tombert · 7y ago · 0 comments
class A {
public int $id = 0;
public ?Foo $somefoo;
}
The language has evolved slowly but surely, and it's now much harder to make obvious mistakes thanks to a bunch of good-quality static analysis tools (one of which I authored).There's still artifacts of past PHP versions that are there, though, which makes it far less nice to use than something more modern.
Later versions of PHP 5 were worlds apart from version 4.