php.net |  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: 2016-12-31 00:37 UTC
Votes:13
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:
Status: Open Package: Scripting Engine problem
PHP Version: 5.3.0alpha2 OS: **
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sskaje at gmail dot com
New email:
PHP Version: OS:

 

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

Reproduce code:
---------------
<?php
class static_test{
  static public $name = 'sskaje';

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

Expected result:
----------------
Hello, sskaje;

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-31 00:37 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Scripting Engine problem
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC