$ git diff --shortstat 14806e08 HEAD
11037 files changed, 663672 insertions(+), 270931 deletions(-)
$ git rev-list --count --no-merges PHP-8.0..PHP-8.1
2279
$ git shortlog --summary --oneline --no-merges PHP-8.0..PHP-8.1|sort -r
816 Nikita Popov
418 Dmitry Stogov
172 Alex Dowad
128 Máté Kocsis
120 George Peter Banyard
79 Hao Sun
42 Anatol Belski
40 Christoph M. Becker
36 Joe Watkins
29 Aaron Piotrowski
28 Remi Collet
28 Kamil Tekiela
class User
{
private readonly int $id;
private readonly string $email;
private readonly string $name;
}
enum Suit {
case Hearts;
case Diamonds;
case Clubs;
case Spades;
}
function pick_a_card(Suit $suit) {}
pick_a_card(Suit::Clubs);
function test($foo = new A()) {}
$fn = Closure::fromCallable('strlen');
$fn = strlen(...);
$fn = Closure::fromCallable([$this, 'method']);
$fn = $this->method(...)
$fn = Closure::fromCallable([Foo::class, 'method']);
$fn = Foo::method(...);
class Foo
{
final public const X = "foo";
}
class Bar extends Foo
{
public const X = "bar";
}
// Fatal error: Bar::X cannot override final constant
// Foo::X
class UserServiceTest extends TestCase
{
private UserRepository&MockObject $userRepository;
}
function neverReturns1(): never
{
throw new Exception();
}
function neverReturns2(): never
{
exit();
}
// From undefined
$arr[] = 'some value';
$arr['doesNotExist'][] = 2;
// From null
$arr = null;
$arr[] = 2;
// From false
$arr = false;
$arr[] = 2;
// Automatic conversion of false to array is deprecated
function foo(int $int) {}
foo(3.14);
// Implicit conversion from float 3.14 to int loses precision
var_dump(str_contains("foobar", null));
// Passing null to argument of type string is deprecated
// bool(true)
class MyDateTime extends DateTime
{
public function modify(string $modifier) { return false; }
}
// Declaration of MyDateTime::modify(string $modifier) should be
// compatible with DateTime::modify(string $modifier): DateTime|false