php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22 names of properties conflict with keywords
Submitted: 1998-01-29 05:24 UTC Modified: 1998-01-29 18:07 UTC
From: koles at atrey dot karlin dot mff dot cuni dot cz Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0 Latest CVS OS: Linux 2.0.33 (Redhat 5.0)
Private report: No CVE-ID: None
 [1998-01-29 05:24 UTC] koles at atrey dot karlin dot mff dot cuni dot cz
Following simple script

<?php
class test { var $include; };
$t = new test;
$t->include = "header.php3";
?>

produces "parse error, expecting `STRING' or `'{'' or `'$''".

If this is a feature :), it would be nice to see some error
messege about conflict declaration of $this->include on 
line 2.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-01-29 18:07 UTC] jim
Fixed in CVS and PHP/3.0b4.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC