|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-06-21 07:26 UTC] php at ak-dev dot com
I think I have found a strange bug, but I am not sure it is one! I explain my problem: //?> #?> If you insert one of those two previous lines, the parse will crash! In my mind, # or // are 'one line comments' and in this way, it has to be impossible to execute code on the same line after those comment tags, but here it is possible! So it is very dangerous to put //?> or #? in your source code! In some cases, it does a crash and it results a parse error, and in others cases it displays source code of the file!! In my mind, it is not normal... PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 12:00:02 2026 UTC |
It means that you cannot write this type of code: !? <? // previous code // mysql_connect('otherhost', 'toto', 'titi'); // //?> // mysql_connect('localhost', 'riri', 'fifi'); ?> This code has no real way, but it represents a problem, real code could be similary for other problems! but you can write this: <? /* previous code mysql_connect('otherhost', 'toto', 'titi'); ?> */ mysql_connect('localhost', 'riri', 'fifi'); ?> In my mind, even if it is a bug, it is the right way to do! a one-line comment has to comment to the end of the line in EVERY CASE!!!!