php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4175 new class_name doesn't work in class definition
Submitted: 2000-04-18 07:37 UTC Modified: 2000-04-18 09:19 UTC
From: miroslav dot sulc at startnet dot cz Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Release Candidate 1 OS: Windows 98
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: miroslav dot sulc at startnet dot cz
New email:
PHP Version: OS:

 

 [2000-04-18 07:37 UTC] miroslav dot sulc at startnet dot cz
In my script I have:

some_class
{
   var $variable = new other_class_name;
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   function ...
}

I get this error:

Parse error: parse error in class_file.php on line 9 (the underlined row)

My script worked fine in PHP3.

Is it erroreous syntax or error in engine?

Thank you.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-04-18 09:19 UTC] andrei at cvs dot php dot net
It's an incompatibility with PHP 3, by design. You cannot have dynamic
initializers for class members.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 12:01:31 2024 UTC