Todd Ruth wrote:
I'd been ignoring the "curly braces" thread, but then I grepped my
code and ... sure enough, I have curly braces that are used to index
into strings. I don't care about this philosophically, but it makes
me wonder about upgrade tools. I know I shouldn't ask this without
volunteering to do it myself, but when a version of php comes out
that makes such a change, is there any chance of having a tool that
updates the code available at the same time?
It seems to me that nothing understands php user code better than the
core php code, so perhaps a tool could be written that uses the guts
of php as a base. I suppose there are some IDEs that could do the
job as well. Sadly, I still use vi, but I bet if something were written
for emacs or eclipse, most people (even me) could learn to use it.
I'm dreading going to php5. I hear that to avoid warnings/notices
I'll need to convert a bunch of "var"s to "public"s. I'll need to
wrap my "get_class"s with "strtolower"s. etc.
It would be so wonderful to throw all my code at a tool that would
change everything that can be easily changed and give me a list of
spots I need to look at manually. A lot of the changes don't take
an overwhelming amount of time to do myself, but when you think
about the thousands of users all doing the same conversions, it just
makes sense for there to be a tool. It might also have the side
benefit of reducing long threads about breaking old code.
Perhaps this already exists and I've missed it. Perhaps it will
never exist because it isn't enough fun to write. Just an idea...
This is what the E_STRICT messages are for. If you turn them on (in PHP
5) you will get very specific messages about language-level issues in
your code.
-Rasmus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php