Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81303 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36851 invoked from network); 28 Jan 2015 11:43:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2015 11:43:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.218.47 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.218.47 mail-oi0-f47.google.com Received: from [209.85.218.47] ([209.85.218.47:41197] helo=mail-oi0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/4F-45774-C7BC8C45 for ; Wed, 28 Jan 2015 06:43:58 -0500 Received: by mail-oi0-f47.google.com with SMTP id a141so17117404oig.6 for ; Wed, 28 Jan 2015 03:43:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rFfAigmviU6rFJG0LJxP0ENdl0qpO1qDmsJbILc7Yzo=; b=EGb7OWLAyb0Nnfx7m6dCcymuMH3LQnOZddwVIq4pBG1+SJ4l1PUdAqYxjv1TrTxwLg fAdjXnhm2KPqRz0VnqhQrc35//iJtYnZn63HfNUZ+S0p3K75XKHR2sZpFQ3QkVOOLMZs rLZbIbmPi7jd84mwthn4qY6+QIq1FKTdsQmUo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=rFfAigmviU6rFJG0LJxP0ENdl0qpO1qDmsJbILc7Yzo=; b=EaseIi/V/Ai+A0IDtQk4hrwB53iSd/O8W7jbqQF53+j50LBsv1lhCFEWQojxCfy3HI x4fce7WXw76GZkudIG7hPQ4vyWm2L8Q69ICeT2/WAHIdBeRc3PCx4mJCQ7mbizPh3ng5 140r0fC7c8fP74RzCI6XLJvmNNkL/G1Qx54tHwJJvDLVM3N+pR/rLLCvLfwvXD2haUJ5 PRVbA4vk4cfvUJ3JDDM95yA8Iw5/nH8GOpI/sM5qrWDXjxgaIS7+/qrNpcGEsZeIH2/M hyQ21tBF1s1Ras8vlz0sn6ezjfQGFUFLkc/XYq4gK6GnsTorQLwqEryZ+Z8GHlzdjWlb /dLQ== X-Gm-Message-State: ALoCoQnt2D5GqXFHX0AdcQjR0dAL0E7+0D7DShiecvwM3YXhmYfXmVYjfY6Lz97BOoMFiTJ+1JXL MIME-Version: 1.0 X-Received: by 10.202.74.215 with SMTP id x206mr1704183oia.58.1422445433080; Wed, 28 Jan 2015 03:43:53 -0800 (PST) Received: by 10.202.214.205 with HTTP; Wed, 28 Jan 2015 03:43:53 -0800 (PST) In-Reply-To: <54C8BB29.7040703@gmail.com> References: <54C80F4F.7020905@gmail.com> <54C8BB29.7040703@gmail.com> Date: Wed, 28 Jan 2015 13:43:53 +0200 Message-ID: To: Rowan Collins Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Proposal: Raise severity of undefined constants From: narf@devilix.net (Andrey Andreev) HI, On Wed, Jan 28, 2015 at 12:34 PM, Rowan Collins wrote: > Benjamin Eberlei wrote on 28/01/2015 08:43: >> >> I think this is too big a BC break. >> >> The usage of $array[key] = 0 instead of "key" is widespread. > > > As I mentioned, the advice *not* to write that has been in the manual since > 2001, so I can't think why any tutorial or example code would teach it as > the right way, but it is possible, I suppose. > > I realise the majority of code is not available publicly, but it would be > good to make some attempt to judge whether it really is widespread, so if > you have any examples or way of measuring it, that would be useful. From what I've seen, most developers seem to put everything in quotes - strings (obviously), integers, floats, even numeric array keys ... boolean and null being the only exceptions (but I've seen that too). No opinion on the subject, just my observations. Cheers, Andrey.