php-features-cheatsheet

This cheatsheet outlines when some various handy features were introduced in different versions of PHP.

View on GitHub

PHP CheatSheet

This cheatsheet outlines when some various handy features were introduced in different versions of PHP.

Obviously not intended to be a comprehensive list.

PHP 8.0

class Thing {
  public function __construct(
  	public string $name = ''
  ) {}
}

$thing = new Thing('Mark');

echo $this->name;
echo match (8.0) {
  '8.0' => "Oh no!",
  8.0 => "This is what I expected",
};

PHP 7.4

PHP 7.3

PHP 7.2

PHP 7.1

PHP 7.0

PHP 5.6