Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96379 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75096 invoked from network); 15 Oct 2016 11:34:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2016 11:34:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=lauri.kentta@gmail.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=lauri.kentta@gmail.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain gmail.com does not designate 188.117.41.47 as permitted sender) X-PHP-List-Original-Sender: lauri.kentta@gmail.com X-Host-Fingerprint: 188.117.41.47 mailgateway.locotech.fi Linux 2.6 Received: from [188.117.41.47] ([188.117.41.47:51146] helo=mailgateway.locotech.fi) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/81-59423-A5412085 for ; Sat, 15 Oct 2016 07:34:50 -0400 Received: from localhost (mailgateway [127.0.0.1]) by mailgateway.locotech.fi (Postfix) with ESMTP id 70332A367DF; Sat, 15 Oct 2016 14:34:47 +0300 (EEST) X-Virus-Scanned: amavisd-new at locotech.fi X-Spam-Flag: NO X-Spam-Score: -1.998 X-Spam-Level: X-Spam-Status: No, score=-1.998 tagged_above=-9998 required=5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9] autolearn=no autolearn_force=no Received: from mailgateway.locotech.fi ([127.0.0.1]) by localhost (mailgateway.locotech.fi [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rq9Y9T1luYFM; Sat, 15 Oct 2016 14:34:35 +0300 (EEST) Received: from posti.fimnet.fi (posti.fimnet.fi [172.16.1.44]) by mailgateway.locotech.fi (Postfix) with ESMTP id 4DF6FA368A3; Sat, 15 Oct 2016 14:34:34 +0300 (EEST) Received: from k-piste.dy.fi (unknown [172.16.1.39]) by posti.fimnet.fi (Postfix) with ESMTPSA id 174D3101C9D; Sat, 15 Oct 2016 14:34:34 +0300 (EEST) Received: from localhost.localdomain ([::1] helo=k-piste.dy.fi) by k-piste.dy.fi with esmtp (Exim 4.87) (envelope-from ) id 1bvNEX-0003oW-SG; Sat, 15 Oct 2016 14:34:33 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sat, 15 Oct 2016 14:34:33 +0300 To: Yasuo Ohgaki Cc: Stanislav Malyshev , Niklas Keller , PHP Internals In-Reply-To: References: <12ecd7d8-2c72-d835-a1af-20698ee9885c@gmail.com> <19522e77-7084-57e7-1fb1-e31b1f9d3c89@gmail.com> <5023d189-21de-93a0-b2fc-8fae77fbbe48@gmail.com> Message-ID: <286fe3084638521a3273df037b602ae0@koti.fimnet.fi> X-Sender: lauri.kentta@gmail.com User-Agent: Roundcube Webmail/1.2.2 Subject: Re: [PHP-DEV] wordwrap with negative width From: lauri.kentta@gmail.com (=?UTF-8?Q?Lauri_Kentt=C3=A4?=) On 2016-10-13 22:39, Yasuo Ohgaki wrote: > Hi Stas, Niklas, > > On Thu, Oct 13, 2016 at 2:13 PM, Stanislav Malyshev > wrote: >>> Sorry for the late reply. Why not keep the current behavior + >>> warning? >> >> Because current behavior makes no sense, negative length is not really >> something that exists. > > I agree Stas. > > If we consider compatibility, keeping nonsense behavior is better. > However, who sets negative offset and make use of it? > Compatibility is important, but this current behavior is not important, > IMO. Keeping the current behavior doesn't really cost anything. Why change it? It's very easy to imagine a script like this: Here someone tries to calculate $max_width dynamically. The calculation might produce a negative result sometimes. The text would be visible, even if it's not word wrapped. It might not look as expected, but it would be readable. -- Lauri Kenttä