php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31395 incorrect parsing of comments
Submitted: 2005-01-03 23:44 UTC Modified: 2005-01-03 23:53 UTC
From: marco-glatz at web dot de Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.2 OS: winxp
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marco-glatz at web dot de
New email:
PHP Version: OS:

 

 [2005-01-03 23:44 UTC] marco-glatz at web dot de
Description:
------------
c-style comments are not correctly parsed if the end of the comment is inside a function-call

Reproduce code:
---------------
/*
		
$fp = fopen('foo.txt', 'w');
		
fwrite($fp, " */\n"); // php assumes comment ends here
fclose($fp);
		
*/

gives this:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ...

Parse error: syntax error, unexpected '"' in ... 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-03 23:53 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See here: http://www.php.net/manual/en/language.basic-syntax.comments.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Sep 27 23:01:26 2024 UTC