Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352299

Summary: PHP start tag is not colored correctly
Product: z_Archived Reporter: Toshihiro Izumi <euthanasia_waltz>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: ganoro, kalin.a
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

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.