Bug #48833 [Com]: Backslashes in comments
| From: | jacob dot bednarz at gmail dot com | Date: | Sun, 28 Dec 2014 05:51:53 +0000 |
| Subject: | Bug #48833 [Com]: Backslashes in comments | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-20408@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=48833&edit=1
ID: 48833
Comment by: jacob dot bednarz at gmail dot com
Reported by: james at jamestandy dot com
Summary: Backslashes in comments
Status: Verified
Type: Bug
Package: Website problem
Operating System: XP
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This was last touched in 2009 and looks to be solved. Can this be closed?
Previous Comments:
------------------------------------------------------------------------
[2009-07-07 13:17:08] bjori@php.net
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...
------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=48833&edit=1