#37979 [Opn->WFx]: new string separator
| From: | derick@php.net | Date: | Sat, 01 Jul 2006 08:13:04 +0000 |
| Subject: | #37979 [Opn->WFx]: new string separator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99024@lists.php.net to get a copy of this message | ||
ID: 37979
Updated by: derick@php.net
Reported By: vandor at freestart dot hu
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
Operating System: All
PHP Version: 6CVS-2006-07-01 (CVS)
New Comment:
The # is already used for comments... so we can't use it here.
Previous Comments:
------------------------------------------------------------------------
[2006-07-01 00:36:35] vandor at freestart dot hu
Description:
------------
This is a feature request:
A new string separator character ie:#, with variable parsing
To write string contains double-quotes and variables have 4 different
solution:
$s = "<p class=\"$class\" id=\"$id\">";
$s = '<p class="'.$class.'" id="'.$id.'">';
$s = <<<HEREDOC
<p class="$class" id="$id"
HEREDOC;
$s = sprintf('<p class="%s" id="%s">', $class, $id);
would suggest a 5th solution:
$s = #<p class="$class" id="$id"#;
Think it would produce cleaner, readable code when write html strings.
The # character used only for example, any may find a better one.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37979&edit=1