Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20120 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99098 invoked by uid 1010); 18 Nov 2005 00:47:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 99083 invoked from network); 18 Nov 2005 00:47:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2005 00:47:08 -0000 X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.4/2.6 Received: from ([204.11.219.139:52462] helo=colo.lerdorf.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id BE/8F-07637-B842D734 for ; Thu, 17 Nov 2005 19:47:08 -0500 Received: from [207.126.233.18] (rasmus2.corp.yahoo.com [207.126.233.18]) (authenticated bits=0) by colo.lerdorf.com (8.13.5/8.13.5/Debian-3) with ESMTP id jAI0l3tJ016727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 17 Nov 2005 16:47:03 -0800 Message-ID: <437D2486.6070305@lerdorf.com> Date: Thu, 17 Nov 2005 16:47:02 -0800 User-Agent: Thunderbird 1.5 (Macintosh/20051025) MIME-Version: 1.0 To: truth@proposaltech.com CC: internals@lists.php.net References: <437B530A.5050105@prohost.org> <437CF6B4.5080207@web.de> <437CF943.7090800@lerdorf.com> <437D0D08.8060805@web.de> <437D0E22.7080006@lerdorf.com> <437D11B7.7090102@web.de> <437D1361.5080504@prohost.org> <1132274666.8441.175.camel@notebook> In-Reply-To: <1132274666.8441.175.camel@notebook> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Upgrading php From: rasmus@lerdorf.com (Rasmus Lerdorf) 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