|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-04-17 12:58 UTC] zeev
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 16:00:02 2025 UTC |
[ 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>