Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC probability #48

Open
abramchikd opened this issue Aug 15, 2023 · 2 comments
Open

RFC probability #48

abramchikd opened this issue Aug 15, 2023 · 2 comments

Comments

@abramchikd
Copy link

abramchikd commented Aug 15, 2023

Hey! Is there any chance that this will be implemented as and RFC?

I can also think of another method of achieving such functionality: allowing any function to be called as an extension method.
If the left operand of $a->callSomething() is a primitive type or the method on object does not exist and __call is not implemented, then try to execute callSomething as a function and pass $a as a first parameter.
Are there any drawbacks of implementing it this way? I tried to do it myself, but php src seems to be too complicated for me

@abramchikd
Copy link
Author

@nikic

@rodrigoslayertech
Copy link

rodrigoslayertech commented Jul 29, 2024

Not only register methods, but properties too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants