|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54715 Reporting error line about undefined constant
Submitted: 2011-05-12 02:46 UTC Modified: 2011-07-02 18:30 UTC
From: lgandras at gmail dot com Assigned:
Status: Duplicate Package: Scripting Engine problem
PHP Version: 5.3.6 OS: CentOS 5.4
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.
Block user comment
Status: Assign to:
Bug Type:
From: lgandras at gmail dot com
New email:
PHP Version: OS:


 [2011-05-12 02:46 UTC] lgandras at gmail dot com

For me the following script should report the error line 4, not 7. It wasn't so 
obvious to track down the issue.

I read this bug, but class constants may not 
be defined in runtime.

Test script:

class A{
  public $arr = array(self::UNDEFINED_CONST);

new A;

Expected result:
Fatal error: Undefined class constant 'self::UNDEFINED_CONST' in - on line 3

Actual result:
Fatal error: Undefined class constant 'self::UNDEFINED_CONST' in - on line 7


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-01 23:08 UTC]
-Package: Unknown/Other Function +Package: Scripting Engine problem
 [2011-07-02 18:30 UTC]
-Status: Open +Status: Duplicate
 [2011-07-02 18:30 UTC]
As you mention in your description, this bug is a duplicate of bug #38324.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC