#46046 [Bgs]: NON-DOUBLE-QUOTED PHP code within the HEREDOC syntax

2009-12-09 Thread vask at dmglobal dot net
 ID:   46046
 User updated by:  vask at dmglobal dot net
 Reported By:  vask at dmglobal dot net
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3.0alpha2
 New Comment:

This incident has been closed since [10 Sep 2008 9:10pm UTC] as
"bogus," but it was never pointed out that /**/ (a php comment) can and
does act as a valid separator to denote what language is in a quoted
string. This is important because now the only thing needed is to find a
text editor that can utilize this.

So what TEXT EDITOR will support the following syntax or a similar
syntax:

/*FILETYPE*/'
'/*FILETYPE*/
"/*FILETYPE*/
"/*FILETYPE*/

where FILETYPE is the extension on the file.

ie) php_css.php


Text Editor NOTES: 
- You can NOT really see the code style in this post so let me
explain.
- All code SHOULD have php code style by default.
- All code in between the /*CSS*/' and '/*CSS*/ SHOULD have css code
style. (NOT a single solid color for a quoted string.)

If anyone knows a text editor that supports code style as mentioned
above please share! Thanks.

-John


Previous Comments:
----

[2008-09-16 02:57:25] vask at dmglobal dot net

NOWDOC or HEREDOC syntax works great with Textmate as long as you
upgrade to the most recent Textmate PHP bundle.

However, it is NOT equivalent to my proposition. I would still like the
ability to use NON-DOUBLE-QUOTED PHP code within the NOWDOC or HEREDOC
section. 

ie)
// I would like to be able to do:
echo <<
HTML;

If this is NOT possible, I would like the status of this feature
request changed from "Bogus" to something more appropriate.

NOTE: I already modified the "Summary" of this feature request to be
something more appropriate.

-John



[2008-09-11 13:25:59] lbarn...@php.net

You can use NOWDOC or HEREDOC syntax:

$foo = <<<'HTML'
bar
HTML;

This already works (on the PHP side) and is equivalent to your
proposition. You can manage for your editor to use a different syntax
highlighting based on the NOWDOC/HEREDOC token.

----------------

[2008-09-11 07:54:20] vask at dmglobal dot net

I do realize this is NOT a PHP bug, but it is NOT a text editor bug or
a support issue.  

This is a feature request for new syntax.  Both PHP and my text editor
would have to support this new syntax or variation of it if implemented.
It makes the most sense if PHP implements new syntax first and then text
editors recognize the new syntax second.

-John

----------------

[2008-09-11 07:30:14] vask at dmglobal dot net

It is impossible for a text-editor to ALWAYS automatically know what
language is being dealt with without a valid separator.

ie)
 


The quoted part of course is going to be a solid color in a text
editor... but... it is impossible for a text editor to tell what client
side language is intended in the 'QUOTED' part so it can style the
'QUOTED' part correctly.

It could be:
vbscript
javascript
html
etc...

If I am wrong please tell me a text editor that knows how to perform
correct code styling on the quoted part in the above example...

The following text editors are INCAPABLE of doing this:
Zend Studio for Eclipse
Textmate
EditPlus
UltraEdit

This is probably because it is not possible for a text editor to tell
what syntax highlighting to use for the quoted part so the text editor
just assumes it is an abitrary string.

If PHP could provide a "valid separator" to tell a text editor what
code highlighting to use for a specific part in the file it could
greatly improve a programmer's and text editor's ability to incorporate
several different languages in a single file.

ie)



The  part could then have html code styling in a text editor
instead of just being a solid color.

This suggestion was intended for more than just correct syntax
highlighting of quoted strings but it is much easier to illustrate that
way...

If this is indeed a bogus feature request I apologize for wasting your
time.

-John



[2008-09-10 21:10:35] lbarn...@php.net

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

That's a bug of your editor, not PHP ;) 

-

#46588 [Bgs]: Support for within NOWDOC/HEREDOC syntax

2008-11-17 Thread vask at dmglobal dot net
 ID:   46588
 User updated by:  vask at dmglobal dot net
 Reported By:  vask at dmglobal dot net
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  5.2.6
 New Comment:

Thanks for the reply and suggestions...

However, HEREDOC/NOWDOC or maybe even a WHATEVERDOC would be more
FLEXIBLE and INTUITIVE if the entire part inside was essentially treated
as a separate file. Thus allowing:

$sql = << LIMIT 1
SQL;

The reason I though this would be possible is because unlike quoted
strings NOWDOC/HEREDOC doesn't require you to escape quotations.


Previous Comments:


[2008-11-17 11:07:14] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Adding this is very likely to break many existing codes.

Use this:
$it = get_it();
$sql = <<get_it LIMIT 1
SQL;



[2008-11-17 03:23:17] vask at dmglobal dot net

Description:

NOWDOC/HEREDOC only allows PHP values such as those allowed within a
quoted string.  Permitting PHP code (such as functions) within
NOWDOC/HEREDOC will allow more flexibility for coding. Also, when using
a text editor, syntax styling for PHP and syntax styling for another
language specified by the NOWDOC/HEREDOC within the same file would be
more readable as breaking apart the NOWDOC/HEREDOC for a function call
would no longer be necessary.

In the below examples I would like to reemphasize the importance of:
- PHP code with PHP syntax styling
- SQL code with SQL syntax styling

$sql = << LIMIT 1
SQL;

Instead of:
$sql = << LIMIT 1
SQL;


Expected result:

$sql = << LIMIT 1
SQL;


Actual result:
--
Does NOT run.





-- 
Edit this bug report at http://bugs.php.net/?id=46588&edit=1



#46588 [NEW]: Support for within NOWDOC/HEREDOC syntax

2008-11-16 Thread vask at dmglobal dot net
From: vask at dmglobal dot net
Operating system: Any
PHP version:  5.2.6
PHP Bug Type: Feature/Change Request
Bug description:  Support for  within NOWDOC/HEREDOC syntax

Description:

NOWDOC/HEREDOC only allows PHP values such as those allowed within a
quoted string.  Permitting PHP code (such as functions) within
NOWDOC/HEREDOC will allow more flexibility for coding. Also, when using a
text editor, syntax styling for PHP and syntax styling for another language
specified by the NOWDOC/HEREDOC within the same file would be more readable
as breaking apart the NOWDOC/HEREDOC for a function call would no longer be
necessary.

In the below examples I would like to reemphasize the importance of:
- PHP code with PHP syntax styling
- SQL code with SQL syntax styling

$sql = << LIMIT 1
SQL;

Instead of:
$sql = << LIMIT 1
SQL;


Expected result:

$sql = << LIMIT 1
SQL;


Actual result:
--
Does NOT run.

-- 
Edit bug report at http://bugs.php.net/?id=46588&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46588&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46588&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46588&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46588&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46588&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46588&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=46588&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=46588&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=46588&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=46588&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=46588&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=46588&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=46588&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46588&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=46588&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=46588&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=46588&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=46588&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=46588&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=46588&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=46588&r=mysqlcfg



#46046 [Bgs]: Incorrect Code Styling When Mixing Languages (PHP Side And Text Editor Side)

2008-09-11 Thread vask at dmglobal dot net
 ID:   46046
 User updated by:  vask at dmglobal dot net
 Reported By:  vask at dmglobal dot net
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3.0alpha2
 New Comment:

I do realize this is NOT a PHP bug, but it is NOT a text editor bug or
a support issue.  

This is a feature request for new syntax.  Both PHP and my text editor
would have to support this new syntax or variation of it if implemented.
It makes the most sense if PHP implements new syntax first and then text
editors recognize the new syntax second.

-John


Previous Comments:


[2008-09-11 07:30:14] vask at dmglobal dot net

It is impossible for a text-editor to ALWAYS automatically know what
language is being dealt with without a valid separator.

ie)
 


The quoted part of course is going to be a solid color in a text
editor... but... it is impossible for a text editor to tell what client
side language is intended in the 'QUOTED' part so it can style the
'QUOTED' part correctly.

It could be:
vbscript
javascript
html
etc...

If I am wrong please tell me a text editor that knows how to perform
correct code styling on the quoted part in the above example...

The following text editors are INCAPABLE of doing this:
Zend Studio for Eclipse
Textmate
EditPlus
UltraEdit

This is probably because it is not possible for a text editor to tell
what syntax highlighting to use for the quoted part so the text editor
just assumes it is an abitrary string.

If PHP could provide a "valid separator" to tell a text editor what
code highlighting to use for a specific part in the file it could
greatly improve a programmer's and text editor's ability to incorporate
several different languages in a single file.

ie)



The  part could then have html code styling in a text editor
instead of just being a solid color.

This suggestion was intended for more than just correct syntax
highlighting of quoted strings but it is much easier to illustrate that
way...

If this is indeed a bogus feature request I apologize for wasting your
time.

-John



[2008-09-10 21:10:35] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

That's a bug of your editor, not PHP ;) 

------------

[2008-09-10 20:53:05] vask at dmglobal dot net

Description:

The ONLY way you can ensure that the correct code styling is done is if
there is some kind of "separator" between different languages mixed in
the same file.

The current implementation of PHP doesn't ALWAYS allow for a
"separator" when mixing different languages such as HTML, JS, PHP,
etc...

With most things we are ok.. there are already separators that can be
recognized by a text editor...
ie) 


However, there are cases where a text editor will be unable to realize
the language change is present because a "separator" will NOT be
present... like if something is in quotations... Below is the easiest
example I can think of.

ie)file.html.php
Don\'t ' . $_GET['verb'] . ''; ?>
- incorrect html code styling (should NOT be a solid color). 
- requires \' or fiddling with the quotations.

ie)file.abc (THEORETICAL)
Don't ?>
?>
- correct html code styling.
- No need to escape or fiddle with the apostrophe in "Don't."

NOTE: Two separate syntaxes (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23658501.html#a22442342

Reproduce code:
---
Don\'t ' . $_GET['verb'] . '';

//--

// file.abc
// THEORETICAL EXAMPLE
// Correct html code styling.
// No need to escape or fiddle with the apostrophe in "Don't."

$variable = ?>Don't ?> ?>


Expected result:

// Text editor displays correct code styling when mixing different
languages together.

// This feature request is about creating a "separator" in PHP so that
the correct code styling will ALWAYS be possible in a text editor when
mixing different client side languages in the same file.

// ie)
// http://bugs.php.net/?id=46046&edit=1



#46046 [Bgs]: Incorrect Code Styling When Mixing Languages (PHP Side And Text Editor Side)

2008-09-11 Thread vask at dmglobal dot net
 ID:   46046
 User updated by:  vask at dmglobal dot net
 Reported By:  vask at dmglobal dot net
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3.0alpha2
 New Comment:

It is impossible for a text-editor to ALWAYS automatically know what
language is being dealt with without a valid separator.

ie)
 


The quoted part of course is going to be a solid color in a text
editor... but... it is impossible for a text editor to tell what client
side language is intended in the 'QUOTED' part so it can style the
'QUOTED' part correctly.

It could be:
vbscript
javascript
html
etc...

If I am wrong please tell me a text editor that knows how to perform
correct code styling on the quoted part in the above example...

The following text editors are INCAPABLE of doing this:
Zend Studio for Eclipse
Textmate
EditPlus
UltraEdit

This is probably because it is not possible for a text editor to tell
what syntax highlighting to use for the quoted part so the text editor
just assumes it is an abitrary string.

If PHP could provide a "valid separator" to tell a text editor what
code highlighting to use for a specific part in the file it could
greatly improve a programmer's and text editor's ability to incorporate
several different languages in a single file.

ie)



The  part could then have html code styling in a text editor
instead of just being a solid color.

This suggestion was intended for more than just correct syntax
highlighting of quoted strings but it is much easier to illustrate that
way...

If this is indeed a bogus feature request I apologize for wasting your
time.

-John


Previous Comments:


[2008-09-10 21:10:35] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

That's a bug of your editor, not PHP ;) 

------------

[2008-09-10 20:53:05] vask at dmglobal dot net

Description:

The ONLY way you can ensure that the correct code styling is done is if
there is some kind of "separator" between different languages mixed in
the same file.

The current implementation of PHP doesn't ALWAYS allow for a
"separator" when mixing different languages such as HTML, JS, PHP,
etc...

With most things we are ok.. there are already separators that can be
recognized by a text editor...
ie) 


However, there are cases where a text editor will be unable to realize
the language change is present because a "separator" will NOT be
present... like if something is in quotations... Below is the easiest
example I can think of.

ie)file.html.php
Don\'t ' . $_GET['verb'] . ''; ?>
- incorrect html code styling (should NOT be a solid color). 
- requires \' or fiddling with the quotations.

ie)file.abc (THEORETICAL)
Don't ?>
?>
- correct html code styling.
- No need to escape or fiddle with the apostrophe in "Don't."

NOTE: Two separate syntaxes (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23658501.html#a22442342

Reproduce code:
---
Don\'t ' . $_GET['verb'] . '';

//--

// file.abc
// THEORETICAL EXAMPLE
// Correct html code styling.
// No need to escape or fiddle with the apostrophe in "Don't."

$variable = ?>Don't ?> ?>


Expected result:

// Text editor displays correct code styling when mixing different
languages together.

// This feature request is about creating a "separator" in PHP so that
the correct code styling will ALWAYS be possible in a text editor when
mixing different client side languages in the same file.

// ie)
// http://bugs.php.net/?id=46046&edit=1



#46046 [NEW]: Incorrect Code Styling When Mixing Languages (PHP Side And Text Editor Side)

2008-09-10 Thread vask at dmglobal dot net
From: vask at dmglobal dot net
Operating system: All
PHP version:  5.3.0alpha2
PHP Bug Type: Feature/Change Request
Bug description:  Incorrect Code Styling When Mixing Languages (PHP Side And 
Text Editor Side)

Description:

The ONLY way you can ensure that the correct code styling is done is if
there is some kind of "separator" between different languages mixed in the
same file.

The current implementation of PHP doesn't ALWAYS allow for a "separator"
when mixing different languages such as HTML, JS, PHP, etc...

With most things we are ok.. there are already separators that can be
recognized by a text editor...
ie) 


However, there are cases where a text editor will be unable to realize the
language change is present because a "separator" will NOT be present...
like if something is in quotations... Below is the easiest example I can
think of.

ie)file.html.php
Don\'t ' . $_GET['verb'] . ''; ?>
- incorrect html code styling (should NOT be a solid color). 
- requires \' or fiddling with the quotations.

ie)file.abc (THEORETICAL)
Don't ?> ?>
- correct html code styling.
- No need to escape or fiddle with the apostrophe in "Don't."

NOTE: Two separate syntaxes (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23658501.html#a22442342

Reproduce code:
---
Don\'t ' . $_GET['verb'] . '';

//--

// file.abc
// THEORETICAL EXAMPLE
// Correct html code styling.
// No need to escape or fiddle with the apostrophe in "Don't."

$variable = ?>Don't ?> ?>


Expected result:

// Text editor displays correct code styling when mixing different
languages together.

// This feature request is about creating a "separator" in PHP so that the
correct code styling will ALWAYS be possible in a text editor when mixing
different client side languages in the same file.

// ie)
// http://bugs.php.net/?id=46046&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=46046&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=46046&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=46046&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46046&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=46046&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=46046&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=46046&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=46046&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=46046&r=support
Expected behavior:http://bugs.php.net/fix.php?id=46046&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=46046&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=46046&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46046&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=46046&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46046&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=46046&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=46046&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=46046&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=46046&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=46046&r=mysqlcfg