|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-06-04 15:59 UTC] laruence@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: laruence
[2013-06-04 15:59 UTC] laruence@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Description: ------------ Allowing syntax like {$c->worker}() would help to solve ambiguity. Test script: --------------- <?php class Worker { public function __invoke() { echo "invoked\n"; } } class Caller { public $worker; public function __construct($worker) { $this->worker = $worker; } public function __call($name, $arguments) { echo "called\n"; } } $c = new Caller(new Worker()); echo $c->worker(); // should output "called" echo {$c->worker}(); // should output "invoked" ?> Expected result: ---------------- called invoked Actual result: -------------- Parse error: syntax error, unexpected '{'