This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 141435 - Diff "string_d_q" and 'string_s_q' highlight
Summary: Diff "string_d_q" and 'string_s_q' highlight
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 22:52 UTC by azrael_valedhel
Modified: 2012-04-10 13:12 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description azrael_valedhel 2008-07-23 22:52:22 UTC
What I thought a minute ago is highlighting strings "string" and 'string' - it would be nice to have an option to gave
those strings different highlight colors as it can be found in some editors, name Notepad++ as one example, I like to
use the same background, but diff foreground colors - and it gives the "not-exactly-string" feel when looking at
$_POST['foo'] or $arr['key'] - you should know what I mean.
Comment 1 azrael_valedhel 2008-07-24 13:34:10 UTC
BTW - single quoted strings are not parsed in the same way as double quoted strings. 
<?php $string = 'value'; echo '$string'; ?> 
won't print |value| but exactly what was inside the quotes - that is: |$string|
while 
<?php echo "$string"; ?> will evaluate the variable inside the quotes into |value|.
Comment 2 Petr Pisl 2008-07-25 14:45:57 UTC
In echo '$var'  the $var is colored as a string. In echo "$var", the $var is colored as a variable. So even now there is
a difference between these strings. 
Comment 3 azrael_valedhel 2008-07-25 19:41:12 UTC
Yes, but you can do much more in "" - like escape characters. It may be just my personal preference, but I'm working 
with some "not that small" project at the moment and I was given the code that some other programmer started. I comment 
it and change it to suit my preferences, highlighting '' and "" in different way would be useful at the moment. But 
that's not just it - just see this N++ highlighted code:
http://img523.imageshack.us/img523/2879/stringkp8.png
(Yup, // and /* */ with separate highlight options would be nice too)
With this type of syntax highlightning I can see at a glance what is going on even with lots of code.