George Antoniadis wrote:
On Mon, Feb 2, 2009 at 10:37 PM, Brian Moon <bri...@dealnews.com> wrote:
On 2/2/09 2:55 AM, George Antoniadis wrote:
While on this subject, would it be a waste of time to suggest a file
extension or include/require parameter that would consider a whole file as
php even if there is no starting<?php tag?
Would save a lot of people from bothering with leading whitespaces, BOM,
etc.
See 2001: http://marc.info/?t=99986406900001&r=1&w=2
--
Brian Moon
Senior Web Engineer
------------------------------
When you care enough to spend the very least.
http://dealnews.com/
Damn that thread was from the stone ages... People top posted then ha? nice
:P
The thread suggested an option (-p or -S) for the CLI that would not require
the php files to have <? ?> tags...
AFAIK this is currently not implemented and I could not see anywhere in the
thread someone dismissing the concept so...
What exactly happened with this? Or did I misinterpret something?
Brian thanks for pointing the thread out but since you seem to be a part of
this could you please tell me what was the conclusion that was reached?. :)
Thanks.
G.
Looks like the conclusion was something like ...
"Hey, I bet if we just ignore this thread people will just
forget about it for EIGHT YEARS!"
... meaning if it didn't happen over the past 8 years ... what hope is
there for the next 8?
More and more web application development is going the way of MVC. The
whole "M" and "C" tend to not need the <?php ?> tags but the "V" still
does. I don't think file extension alone is sufficient to decide which
to use (especially when using 'require' and 'include' within code) so
the easiest thing to do is just not change anything.
A good solution might be:
- by default, never use <?php and ?> tags to escape in and
out of php/print modes
- only use <?php and ?> tags when including code with a new
"include_with_tags FILENAME" statement.
How to get to there from here would be a tough migration problem to
solve, though.
Another option would be to create a new "include" equivalent like
"import" or "include_php" which doesn't drop into HTML mode by default.
Then, have the CGI flag that enables PHP mode by default.
-- Dante
----------
D. Dante Lorenso
da...@lorenso.com
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php