php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #278 Class definitions must be terminated with a ;
Submitted: 1998-04-17 04:17 UTC Modified: 1998-04-17 12:58 UTC
From: kk at shonline dot de Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0 Release Candidate 3 OS: Solaris 2.5.1
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: kk at shonline dot de
New email:
PHP Version: OS:

 

 [1998-04-17 04:17 UTC] kk at shonline dot de
[ I have already sumitted this to the mailing list yesterday
  in an informal way. -- KK ]

Class definitions must be terminated with a ;. This is
confusing, since other blocks end themselves.

Code examples:

This works:

/home/schulung/www # cgi/php
<?php
for ($i=0; $i<10; $i++) { print $i; }
Content-type: text/html
 
0123456789print "x";
x
/home/schulung/www # 

But this breaks:

/home/schulung/www # cgi/php
<?php
class x {
        var $a, $b;
}
 
print "x";
Content-type: text/html
 
<br>
<b>Parse error</b>:  parse error, expecting `';'' in <b>-</b> on line
<b>6</b><br>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-17 12:58 UTC] zeev
Behavior changed, that trailing semicolon is no longer required.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 15:01:32 2024 UTC