Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91576 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47439 invoked from network); 9 Mar 2016 11:08:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2016 11:08:45 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wm0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:36660] helo=mail-wm0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/0A-15119-C3400E65 for ; Wed, 09 Mar 2016 06:08:44 -0500 Received: by mail-wm0-f49.google.com with SMTP id n186so172705377wmn.1 for ; Wed, 09 Mar 2016 03:08:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=Y4WKMSIhaeDBOg2oaPDBLv2zKHsnyqvNyxAJC7HGcdU=; b=dWj9py8ZiLSyA6U4yiuzqkMHrw7Uwb2I6rlPet9H7htZEi+eI/3trUCRbhvks+PIb0 yrB3cUZZAYFgKvUzdbONo6/BRY1sJImymOEx1aGLH9gsgQ8CSG73Lv3Jk5J6Kj3Ajwj6 hXxGMkcmEp6wN/eR0J1ZX+thIpGuig0owXH79Cz+nrKiK6tzclN2/Vev9bluyeBW1QaB ly1+GEzRciLtdijg592MpHuf8ue/YdrqXE0hSJUbaxruB/kvaHOWHTDr2f9HhLLOt+M5 QLVde7C6LGIQrJKXZ/LubVf8vvluXFDz+pEfxrZvE9UjKcUdE66TRJn91SGQPvjEd9+2 RiWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Y4WKMSIhaeDBOg2oaPDBLv2zKHsnyqvNyxAJC7HGcdU=; b=O52tyaUAi9HquEAlPtysst52Ncke/uhuHQd9lmNgPvyFK7/cx0lCG2+g4bqYHZ22VM JlrHgV6KoPOQigavSyjhSNpNzUeufYVDpTjye86KQzTA4+XrC792qtFD7mrFc3ytfQ90 DRYa3RKaAa6Q/HLJwDs9UJ8zwj9OdPI1H3x9flDrkuuqhG7robcCtfAvBL33bf4jW3oH NtPYrvcX3uDi/Cav+9dihJvkg6L7A0oUXoB/oTd0Nht+VqFsqNWhMPk5iS1KiTmC1CCS KfouzDefMTDrQ4RQ0dm4PCLMjKQRoNCSfclts9XSBOHo2xug90uVmVuW2iC/BEOIOmtI CN7w== X-Gm-Message-State: AD7BkJLA9sXOkqcNrkucFCPI0/BeeRtJy9PggT5NI6QNNQT/KZT26I1O8xLoHqQAFzrxWg== X-Received: by 10.194.93.42 with SMTP id cr10mr5602460wjb.33.1457521721858; Wed, 09 Mar 2016 03:08:41 -0800 (PST) Received: from [192.168.0.152] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id e14sm7833288wmi.21.2016.03.09.03.08.40 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Mar 2016 03:08:41 -0800 (PST) To: internals@lists.php.net References: <1F.91.55238.41F10D65@pb1.pair.com> <56D42CD3.6020602@gmail.com> <56D57DF4.8000906@gmail.com> <56D5D2AD.6070805@gmail.com> <56D5DDA6.4080607@fleshgrinder.com> <40.73.36499.548B6D65@pb1.pair.com> <56D6BBD0.5010505@gmail.com> <56D73386.3000903@fleshgrinder.com> <86.68.21983.A2508D65@pb1.pair.com> <56D86C00.6000904@fleshgrinder.com> <12.FB.08749.AF759D65@pb1.pair.com> <56DAC26C.50304@fleshgrinder.com> <56DAE00F.2030203@lsces.co.uk> <56DAF480.7030508@fleshgrinder.com> <0B.E0.29316.019CBD65@pb1.pair.com> <56DBFDB5.1010806@fleshgrinder.com> <43.5B.29316.A864DD65@pb1.pair.com> <56DD64F5.5010503@gmail.com> <56DEA829.5030903@gmail.com> <2D.96.15119.232FFD65@pb1.pair.com> Message-ID: <56E003BF.5010200@gmail.com> Date: Wed, 9 Mar 2016 11:06:39 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal From: rowan.collins@gmail.com (Rowan Collins) Yasuo Ohgaki wrote on 09/03/2016 10:35: > Hi all, > > Keeping aliases do not harm much. It may stay forever. > > How about stop discussion, but write code? > The only chance this kind of proposal to pass is existence of > "conversion program" that replaces aliases in older codes. > > If there is anyone who would like to volunteer for this, please write > generic code that can replace function/method/class/keyword aliases > perfectly. i.e. Write program that understands PHP syntax and replaces > targets precisely, not "perl pi.bak -e 's/obsolete_name/new_name/g' > *.php. This program would be very useful for us to clean various > things up. Somebody already posted this quick solution, using PHP's built-in tokenizer: https://gist.github.com/colinodell/5fb5e5d474674f294a38 I don't know if there are any edge-cases it doesn't cater for, or undesirable side-effects, but it's certainly smarter than just a Perl regex. There are also examples for making code modification in the docs for Nikita's PHP-Parser library: https://github.com/nikic/PHP-Parser/ Regards, -- Rowan Collins [IMSoP]