pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/php/php-src/pull/21440

m/assets/global-68dd150ce6c8e711.css" /> [RFC] ReflectionAttribute::getCurrent() by DanielEScherzer · Pull Request #21440 · php/php-src · GitHub
Skip to content

[RFC] ReflectionAttribute::getCurrent()#21440

Open
DanielEScherzer wants to merge 2 commits intophp:masterfrom
DanielEScherzer:attribute-get-current
Open

[RFC] ReflectionAttribute::getCurrent()#21440
DanielEScherzer wants to merge 2 commits intophp:masterfrom
DanielEScherzer:attribute-get-current

Conversation

@DanielEScherzer
Copy link
Member

No description provided.

#[Attribute]
class Demo {
public function __construct( $args ) {
echo ReflectionAttribute::getCurrent();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more common to use var_dump here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though, I'd also be fine with just echoing the name property/method of the object rather than dumping the whole object. Other internals regulars may have a different opinion...

@Crell
Copy link
Contributor

Crell commented Mar 16, 2026

I believe we'd also want tests to confirm what happens if that method is called outside the constructor, and how it will error (or null, or whatever it's going to do).

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.

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy