Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352299 - PHP start tag is not colored correctly
Summary: PHP start tag is not colored correctly
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-17 20:15 EDT by Toshihiro Izumi CLA
Modified: 2020-05-14 11:09 EDT (History)
2 users (show)

See Also:


Attachments
patch (1.41 KB, patch)
2011-07-17 20:16 EDT, Toshihiro Izumi CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toshihiro Izumi CLA 2011-07-17 20:15:45 EDT
(1) short_open_tag = Off

Steps to reproduce:
1. Check Off Preferences > PHP > PHP Interpreter > Use Short Tags
2. Create new blank php file

Case 1:
3. Enter
<?phpphpinfo();

"<?php" is colored as a php start tag.
However, it is not a php start tag. Run this script(w/short_open_tag=Off), output is "<?phpphpinfo();" as plain text.

Case 2:
3. Enter ([EOF] means End Of File)
<?php[EOF]

"<?php" is colored as a php start tag.
However, "<?php" at the end of file is not a php start tag. Run this script, output is "<?php" as plain text.


(2) short_open_tag = On

Steps to reproduce:
1. Check On Preferences > PHP > PHP Interpreter > Use Short Tags
2. Create new blank php file

Case 1:
3. Enter
<?phpinfo();

"<?php" is colored as a php start tag.
However, the php start tag is "<?" and "phpinfo" is a function name. Run this script(w/short_open_tag=On), output is the result of phpinfo().

Case 2:
3. Enter ([EOF] means End Of File)
<?php[EOF]

"<?php" is colored as a php start tag.
However, the php start tag is "<?" and "php" is imcomplete/invalid text (syntax error is reported correctly on the editor). Run this script, output is syntax error(unexpected $end).
Comment 1 Toshihiro Izumi CLA 2011-07-17 20:16:17 EDT
Created attachment 199801 [details]
patch
Comment 2 Zhongwei Zhao CLA 2011-08-14 07:03:01 EDT
applied to head,thanks
Comment 3 Kalin CLA 2011-10-20 03:30:47 EDT
Verified.
Fixed.