#48833 [NEW]: Backslashes in comments
| From: | james at jamestandy dot com | Date: | Tue, 07 Jul 2009 12:37:53 +0000 |
| Subject: | #48833 [NEW]: Backslashes in comments | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-5262@lists.php.net to get a copy of this message | ||
From: james at jamestandy dot com
Operating system: XP
PHP version: Irrelevant
PHP Bug Type: Website problem
Bug description: Backslashes in comments
Description:
------------
Backslashes within user comments may not be getting inserted properly
Reproduce code:
---------------
http://uk3.php.net/manual/en/language.namespaces.basics.php
Looking at the first comment, I think backslashes are being stripped out
of some text - this could get very confusing for users new to namespaces
who read through the extra comments!
Expected result:
----------------
Im fairly sure the first comment should look like this
<?php
// namespace MyProject\DB;
require 'db.php';
use MyProject\DB; // fine; same as DB\
use MyProject\DB\Connection as DBC; // fine
use MyProject\DB as HM; // fine
use HM\Connection as DBC2; // class call ends with FATAL!!!
$x = new DBC(); // fine
$y = new HM\Connection(); // fine
$z = new DBC2(); // Fatal error: Class 'HM\Connection' not found
?>
Actual result:
--------------
<?php
// namespace MyProject\DB;
require 'db.php';
use MyProjectDB; // fine; same as DB\
use MyProjectDBConnection as DBC; // fine
use MyProjectDB as HM; // fine
use HMConnection as DBC2; // class call ends with FATAL!!!
$x = new DBC(); // fine
$y = new HMConnection(); // fine
$z = new DBC2(); // Fatal error: Class 'HM\Connection' not found
?>
--
Edit bug report at http://bugs.php.net/?id=48833&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48833&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48833&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48833&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48833&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48833&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48833&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48833&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48833&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48833&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48833&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48833&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48833&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48833&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48833&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48833&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48833&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48833&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48833&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48833&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48833&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48833&r=mysqlcfg