|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #46658 static keywords supports in{} in heredoc
Submitted: 2008-11-24 04:29 UTC Modified: 2021-07-26 13:32 UTC
Avg. Score:4.0 ± 0.8
Reproduced:10 of 10 (100.0%)
Same Version:5 (50.0%)
Same OS:3 (30.0%)
From: sskaje at gmail dot com Assigned: cmb (profile)
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.3.0alpha2 OS: **
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
9 - 7 = ?
Subscribe to this entry?

 [2008-11-24 04:29 UTC] sskaje at gmail dot com
Can static keywords like self:: parent:: ... be supported when using sth like {self::$varname} in HEREDOC ?

Reproduce code:
class static_test{
  static public $name = 'sskaje';

  static public function test()
    $string = <<<HEREDOC
Hello, {self::$name};
    echo $string;

Expected result:
Hello, sskaje;

Actual result:
Notice: Undefined variable: name in G:\wwwroot\Test\static_call.php on line 8
Hello, {self::};


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-31 00:37 UTC]
-Package: Feature/Change Request +Package: Scripting Engine problem
 [2021-07-26 13:32 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-07-26 13:32 UTC]
No progress for more than ten years, so I'm closing as WONTFIX.
Anybody who is still interested in this feature, please pursue the
RFC process[1].

[1] <>
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Aug 17 19:05:44 2022 UTC