|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-22 16:55 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 07:00:01 2026 UTC |
Description: ------------ Hello, I have noticed that you cannot call an object method in a heredoc syntax, for example: class toto { function method() { return "coucou"; } } $toto = new toto(); echo <<<EOT toto method : {$toto->method()} EOT; Should ouput "toto method : coucou", yet it outputs: Parse error: parse error, unexpected '(', expecting '}' Is there a way to do that or not? Thanks to all