Skip to content

Include property hooks in phpdbg opcode listings - #25366

Open
crystarm wants to merge 1 commit into
php:PHP-8.4from
crystarm:fix/phpdbg-property-hook-opcodes
Open

crystarm wants to merge 1 commit into
php:PHP-8.4from
crystarm:fix/phpdbg-property-hook-opcodes

Conversation

@crystarm

Copy link
Copy Markdown
Contributor

Fixes #25338.

phpdbg's opcode listing only iterated the class function table, so property hooks were omitted. Targeted hook selectors also did not work because the selector parser discarded the hook suffix and lowercased the case-sensitive property name.

This change:

  • includes declared property hooks in class opcode listings;
  • adds hooks to the method count and name list;
  • supports -p=Class::$property::get/set;
  • preserves property-name case while keeping function and method lookup
    case-insensitive;
  • avoids duplicate trait-cloned hook op arrays;
  • adds PHPT coverage.

@bwoebi

bwoebi commented Nov 10, 2026

Copy link
Copy Markdown
Member

This should probably be based on top of PHP 8.4.

@crystarm
crystarm force-pushed the fix/phpdbg-property-hook-opcodes branch from b8a948d to fc982c3 Compare November 11, 2026 10:30
@crystarm
crystarm changed the base branch from master to PHP-8.4 November 11, 2026 10:31
@crystarm

Copy link
Copy Markdown
Contributor Author

cc @sebastianbergmann

@crystarm
crystarm force-pushed the fix/phpdbg-property-hook-opcodes branch from fc982c3 to b705424 Compare November 17, 2026 16:29
@crystarm
crystarm force-pushed the fix/phpdbg-property-hook-opcodes branch from b705424 to 24f70e5 Compare November 24, 2026 13:09
@crystarm

Copy link
Copy Markdown
Contributor Author

@LamentXU123
Would you have time to review this phpdbg fix? (˶ᵔ ᵕ ᵔ˶)
I noticed you reviewed #24054 and #24055. This adds property hooks to opcode listings and lets you print the opcodes for individual hooks

@LamentXU123

LamentXU123 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

I don't have exp in phpdbg nor do I have time to look into it recently being very busy. Perhaps @ndossche @iliaal can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

phpdbg's opcode listing does not include the bodies of property hooks

3 participants