Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 144431 - [65cat] [php] String Break
[65cat] [php] String Break
Status: NEW
Product: php
Classification: Unclassified
Component: Code
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: Petr Pisl
Depends on:
  Show dependency treegraph
Reported: 2008-08-19 18:51 UTC by nvarun
Modified: 2010-09-17 05:29 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description nvarun 2008-08-19 18:51:16 UTC
[ BUILD # : 6.5 Beta ]
[ JDK VERSION : 1.6.0_05 ]

Suppose I have to "echo" a string like this

echo "Hello World";

For instance, if the cursor position is just right to the letter 'o'
in Hello like this;
echo "Hello$cursor World"

where $cursor is actually the position of cursor, not the word
$cursor. If you remember in Java, when you hit enter in such
scenario. String breaks into 2 strings with a plus sign in between
like this-

"Hello" +
" World"

I thought PHP support might have similar functionality, though
instead of  '+' sign, we have '.' sign, right?

" World"

I queried php mailing list for nbusers and found out that its
inconsistence, and might be a bug!

So, I am filing this issue..
Comment 1 nvarun 2008-08-19 18:52:38 UTC
Changed the summary a bit to follow NetCAT etiquette.
Comment 2 Tomasz Slota 2008-08-19 20:49:27 UTC
Comment 3 Tomasz Slota 2008-08-20 09:54:44 UTC
In PHP it is possible to have strings spanning across multiple lines. It is a common practice with SQL statements e.g.


SELECT * FROM `table`


`id` = %d

`this` = \'that\'

', $id);

So the break string functionality would be counterproductive for many users. We could still provide it as an option. I am changing the issue type to 

(based on feedback from Jacob Christophersen)
Comment 4 Petr Pisl 2008-08-29 08:30:01 UTC
We discussed this on the mailing list. Because this is a way how to write correct code in PHP.

The enhancement is that there can be an option in the PHP editor setting, which will direct the behavior. The default
one should be the current one.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo