#48833 [Opn->Ver]: Backslashes in comments
| From: | bjori@php.net | Date: | Tue, 07 Jul 2009 13:17:08 +0000 |
| Subject: | #48833 [Opn->Ver]: Backslashes in comments | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-5263@lists.php.net to get a copy of this message | ||
ID: 48833
Updated by: bjori@php.net
Reported By: james at jamestandy dot com
-Status: Open
+Status: Verified
Bug Type: Website problem
Operating System: XP
PHP Version: Irrelevant
New Comment:
Hah. I never noticed this before as the mirrors I use run on PHP5.3.
This is due to the fact syntax highlighting is generated on the mirror
itself, which may as well be running PHP4 which doesn't recognize this
syntax...
Previous Comments:
------------------------------------------------------------------------
[2009-07-07 12:37:52] james at jamestandy dot com
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 this bug report at http://bugs.php.net/?id=48833&edit=1