Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Consistency of __PROPERTY__ magic constant meaning in hook signature #17222

Closed
@ondrejmirtes

Description

@ondrejmirtes

Description

If I look at what__METHOD__ does, it has meaning in:

  • method attributes
  • default parameter values
  • parameter attributes
  • in method body

Here's a quick proof:https://3v4l.org/EqGLn

When I compare that with__PROPERTY__, it only has meaning in:

  • parameter attributes
  • in hook body

Of course, hook parameter cannot have a default value. But it'd be nice for consistency if it also had meaning in:

  • hook attributes

Which it currently has not. Additionally, it might be up to discussion, if it should have meaning in:

  • default property value
  • property attributes

Here's a quick script to verify:https://3v4l.org/4BMJt#v8.4.2

/cc@iluuu1994@Crell

PHP Version

PHP 8.4

Operating System

N/A

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp