Re: Headsup: PHP7 feature freeze
| From: | Marc Bennewitz | Date: | Thu, 25 Jun 2015 19:39:21 +0000 |
| Subject: | Re: Headsup: PHP7 feature freeze | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86881@lists.php.net to get a copy of this message | ||
On 06/25/2015 09:31 PM, Christoph Becker wrote:
Marc Bennewitz wrote:Nice to see this - didn't noted it in the last month :) But there is one edge case that is not handled by PHP-7 at current behavior; http://3v4l.org/HkRQ7 class Foo {I would really like to see directly calling a string of "Class::method" be fixed for 7.0. It's currently resulting in a fatal error and is inconsistent with call_user_func[_array], is_callable and the callable type-hint. There is also a PR open since April 2014 : https://github.com/php/php-src/pull/659Apparently, your PR has been overlooked, but it seems this is already implemented as result of merging PR #1264[1]; see <http://3v4l.org/W8hQA>. Can you please verify, and close your PR #659 as appropriate. [1] <https://github.com/php/php-src/pull/1264>
public static function __callStatic($m, $args) {
var_dump($m);
}
public function __call($m, $args) {
var_dump($m);
}
}
$callable = [new Foo, ''];
$callable(); // string(0) ""
$callable = 'Foo::';
$callable(); // Fatal error: Uncaught Error: Call to undefined function Foo::()
This behavior is inconsistent!
Thanks
Marc