Community
Participate
Working Groups
Steps to Reproduce: 1. Create a anything.tpl file 2. Enter '<?xml version="1.0" encoding="UTF-8"?>' More Information: Yes, I know this is related to bug 185017. But for any non-PHP file being handled by the PHP editor (such as .tpl) or by PHP files when short tags is off, there should be a fix/workaround for avoiding this warning.
workaround for avoiding this warning use '<<??>?xml version="1.0" encoding="UTF-8"?>' instead of '<?xml version="1.0" encoding="UTF-8"?>'
I'm sorry, moshe, but your fix doesn't work on machines where short tags are off. I make this argument, because in the PHP manual (http://devzone.zend.com/manual/language.basic-syntax.html)... *** Note: Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags. *** While I do understand the inherent complexity in this bug, it seems to me that the countless situations where developers would desire to use this code would warrant taking the time to fix the bug, rather than post a non-obvious workaround that obfuscates the code.
Your code '<?xml version="1.0" encoding="UTF-8"?>' cause parsing error when running it as PHP script. "Parse error: syntax error, unexpected T_STRING in C:\Zend\runtime-New_configuration\Test\test.php on line 1". if you not used short tags use the following: '<<?php?>?xml version="1.0" encoding="UTF-8"?>'. PHP editor should support php interperter.
Created attachment 74452 [details] screenshot PHP doesn't report any errors if you set 'short_open_tag = Off' in php.ini. I cannot understand why pdt developers reject this functionality. #166764
Not to mention that the original bug is for .tpl files, which aren't natively parsed directly by PHP anyway!
There open enh for .tpl 152451 means different editor for .tpl files.
won't be fix