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
 [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

Pull Requests

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: Wed Oct 30 22:01:28 2024 UTC