Skip to content

New PHP 8.4 Syntax: Property Hooks #88

@KorvinSzanto

Description

@KorvinSzanto

Property hooks are landing in 8.4, the next version of PER-CS should cover them:

class Foo
{
    public function __construct(private User $user) {}

    public string $userName {
        get {
            return $this->user->userName;
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions