Bug #18151: Strip comments (php -w) strips #!/usr/bin/php directives!
| From: | polone at townnews dot com | Date: | Wed, 03 Jul 2002 21:50:30 +0000 |
| Subject: | Bug #18151: Strip comments (php -w) strips #!/usr/bin/php directives! | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-13036@lists.php.net to get a copy of this message | ||
From: polone@townnews.com
Operating system: Linux
PHP version: 4.2.1
PHP Bug Type: *General Issues
Bug description: Strip comments (php -w) strips #!/usr/bin/php directives!
The php -w option also strips comments outside of the PHP tags. Thus, a
program like:
#!/usr/bin/php -q
<?php
// Bye-Bye comment
print "hello world\n";
?>
Would end up like:
<?php
print "hello world\n"; ?>
But, this is incorrect. It should be:
#!/usr/bin/php -q
<?php
print "hello world\n"; ?>
It appears this only happens if the first line in the file is formatted
like a PHP comment. Thus,
# This is not a PHP comment!!!!
<?php
print "hello world\n";
?>
Also strips the "# This is not a PHP comment!!!!".
Regards,
Patrick O'Lone
INN/TownNews.com
polone@townnews.com
--
Edit bug report at http://bugs.php.net/?id=18151&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18151&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18151&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18151&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18151&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18151&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18151&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18151&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18151&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18151&r=globals