readonly class PostData { public function __construct( public string $title, public string $author, public string $body, public DateTimeImmutable $createdAt, public PostState $state, ) {}} https://stitcher.io/blog/new-in-php-82#readonly-classes-rfc $rng = $is_production ? new Random\Engine\Secure() : new Random\Engine\Mt19937(1234); $randomizer = new Random\Randomizer($rng); $randomizer->shuffleString('foobar'); https://stitcher.io/blog/new-in-php-82#new-random-extension-rfc function alwaysFalse(): false { return false; } https://stitcher.io/blog/new-in-php-82#null,--true,-and-false-as-standalone-types-rfc function generateSlug((HasTitle&HasId)|null $post) { } https://stitcher.io/blog/new-in-php-82#disjunctive-normal-form-types-rfc trait Foo { public const CONSTANT = 1; public function bar(): int { return self::CONSTANT; }} https://stitcher.io/blog/new-in-php-82#constants-in-traits-rfc function connect( string $user, #[\SensitiveParameter] string $password ) { } https://stitcher.io/blog/new-in-php-82#redact-parameters-in-back-traces-rfc class Post {} $post = new Post(); $post->title = 'Name'; https://stitcher.io/blog/deprecated-dynamic-properties-in-php-82 enum A: string { case B = 'B'; const C = [self::B->value => self::B]; } https://stitcher.io/blog/new-in-php-82#fetch-properties-of-enums-in-const-expressions-rfc