Skip to content

Implemented instance invoke - #225

Closed
laruence wants to merge 1 commit into
php:masterfrom
laruence:instance_invoke
Closed

laruence wants to merge 1 commit into
php:masterfrom
laruence:instance_invoke

Conversation

@laruence

@laruence laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member

@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member Author

This is really a minor patch, so I think maybe make it as a PR not RFC is okey.

@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member Author

hmm, after second thought, I think I should make a RPC instead. close this PR, sorry for noise.

@laruence laruence closed this Nov 2, 2012
@nikic

nikic commented Nov 2, 2012

Copy link
Copy Markdown
Member

Should be RFC and I'd really prefer it if you would generalize the whole thing, in particular also allowing it on normal calls like f()(). Or at least remove the restriction that the stuff only applies to new (imho we should do that regardless of this).

@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member Author

yes, but it should be (f())() , not f()()... heh

@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member Author

otherwise, I think I will got a lots of rr conflicts...

@nikic

nikic commented Nov 2, 2012

Copy link
Copy Markdown
Member

I'd be okay with (f())() too, though I think that the other one can be possible too (though that's always a hard thing to say with PHP's grammar ^^).

Btw, a problem that you might hit is that (function() { ... })() will not currently work because the closure is dtored prematurely. At least I'd think that this will happen, but I'm not sure about it.

@laruence

laruence commented Nov 2, 2012

Copy link
Copy Markdown
Member Author

actually, it is stored in function table with a mangled name, but yeah, it will be a little different.

@treffynnon

Copy link
Copy Markdown

👍 I would like to see patch for this issue make it into the pipeline for PHP. Seems this feature request has gone quiet. Is there anyway to bring it back to life?

@nikic

nikic commented May 13, 2013

Copy link
Copy Markdown
Member

@treffynnon This is still alive, see PR #301. Will most likely be part of 5.6. Just haven't come around to writing an RFC yet ;)

@treffynnon

Copy link
Copy Markdown

@nikic Excellent news. I have updated the original bug report/feature request with a link to the new PR: https://bugs.php.net/bug.php?id=63253

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

Successfully merging this pull request may close these issues.

3 participants