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

Parser bug (compared to PHP7): can't call a closure inline #3890

Closed
fredemmott opened this issue Sep 30, 2014 · 7 comments
Closed

Parser bug (compared to PHP7): can't call a closure inline #3890

fredemmott opened this issue Sep 30, 2014 · 7 comments

Comments

@fredemmott
Copy link
Contributor

<?php

class Foo {
  public function bar() {
    (function() { var_dump('baz'); })();
  }
}

(new Foo())->bar();

Fixed in recent PHP7: http://3v4l.org/e6LlW

@mbertanha
Copy link

I'm working on this issue.

@steelbrain
Copy link
Contributor

it's been 21 days, any update?

@Majkl578
Copy link
Contributor

Majkl578 commented Nov 2, 2014

@steelbrain: How does that concern user-land? It's a feature request and such behavior is not present in any PHP version.
@fredemmott: It's not a php incompatibility, it's just a feature request, until PHP 7.0.0 is out (>1 years from now).

@steelbrain
Copy link
Contributor

it's not available in any PHP version doesn't mean it's not cool, or is it? 😄

@paulbiss
Copy link
Contributor

paulbiss commented Nov 6, 2014

Fix is up internally D1662663

@simonwelsh
Copy link
Contributor

Perhaps need a "php7 incompatibility" label ;)

@steelbrain
Copy link
Contributor

@simonwelsh, you might want to take a look at the 3v4l.org link in comment#1 :-)

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

No branches or pull requests

6 participants