Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68161 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43520 invoked from network); 18 Jul 2013 14:30:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2013 14:30:26 -0000 Received: from [127.0.0.1] ([127.0.0.1:9199]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id C4/D7-20914-20CF7E15 for ; Thu, 18 Jul 2013 10:30:26 -0400 Authentication-Results: pb1.pair.com header.from=shm@digitalsun.pl; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=shm@digitalsun.pl; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain digitalsun.pl from 209.85.223.170 cause and error) X-PHP-List-Original-Sender: shm@digitalsun.pl X-Host-Fingerprint: 209.85.223.170 mail-ie0-f170.google.com Received: from [209.85.223.170] ([209.85.223.170:41223] helo=mail-ie0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/C7-20914-DC9F7E15 for ; Thu, 18 Jul 2013 10:21:03 -0400 Received: by mail-ie0-f170.google.com with SMTP id e11so7236930iej.29 for ; Thu, 18 Jul 2013 07:20:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=7jbkONrxRUTiHC6Jl1FCveK+cwowJxPqyMrAnFFdeQs=; b=Njd4xO9CNDNaIhd+qLi0mIraXA0tmoGNL9AImPsl9Ie4PeaTLfLv40Tzxbx2hSxno1 b546XNxhclqCnz4AgcMa628KJNpu95Y8U/9fSH2759uTBrdStNIg7xLmSW2Y3F2IczOv hN8+4QJ8JrRsHI9A3lgf/9DGXSBAELTx6GYXT89U50zDMpjXVgBn0HlnSppiLFgp+43A PQreJ9+bFYvqd3fX4194rcp+8unUOgphjr73G0JgNbjz1763glauobEmwQDTs1uPPiF8 7xWu3HrtqbLdWa+O/1W0k747zm4TlE/6Z86tmwuqitTxRESaR+pqokoN+nzNktJikSA0 SDdQ== MIME-Version: 1.0 X-Received: by 10.42.237.204 with SMTP id kp12mr6797763icb.18.1374157258243; Thu, 18 Jul 2013 07:20:58 -0700 (PDT) Received: by 10.64.249.202 with HTTP; Thu, 18 Jul 2013 07:20:58 -0700 (PDT) X-Originating-IP: [178.213.221.23] In-Reply-To: References: Date: Thu, 18 Jul 2013 16:20:58 +0200 Message-ID: To: Chris London Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=047d7b6daa103e502904e1c9eb79 X-Gm-Message-State: ALoCoQkjy0+zb7xq1UDYD5tVaR5V+hsRK8PVdjNgPn3cNrk5o4qkZB4n1iqyOHw4Y0adtL1xTs0N Subject: Re: [PHP-DEV] Feature Proposal: Allow letter decrementing From: shm@digitalsun.pl (Mateusz Kocielski) --047d7b6daa103e502904e1c9eb79 Content-Type: text/plain; charset=ISO-8859-1 > It seems logical that if we support increment we should support decrement. > > My proposal: > > 1) Support decrementing letters > - or - > 2) Throw a notice explaining that decrementing is not supported so > developers quickly know they can't do that > > One hiccup. I imagine maybe the reason we don't support decrementing is > because what would happen if you tried to decrement 'A'. In that case I > would suggest either returning NULL or throwing a notice. > > Thanks for the input > > Chris London Hello, Does anybody understand the rules behind the string incrementation? What's the explanation of following behaviour? '$x="ZZ";$x++;var_dump($x);' returns string(3) "AAA" '$x=" ZZ";$x++;var_dump($x);' returns string(3) " AA" Regards, Mateusz Kocielski --047d7b6daa103e502904e1c9eb79--