Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96385 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11046 invoked from network); 16 Oct 2016 00:28:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2016 00:28:58 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.182 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.182 mail-pf0-f182.google.com Received: from [209.85.192.182] ([209.85.192.182:33036] helo=mail-pf0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/A5-59423-9C9C2085 for ; Sat, 15 Oct 2016 20:28:58 -0400 Received: by mail-pf0-f182.google.com with SMTP id 128so65102997pfz.0 for ; Sat, 15 Oct 2016 17:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=yv550UVT8gsG1Pr1zeyKgivao8IT1VyOwmCR3oYjF08=; b=PatDJt/5k5eCxDHfxctyjcflQuavNEbixkkcSmk/o1O+TjQKhUK5ccAUDWYpk5QZ6D +zhZN1BXGQ01676k5bw1X/FqNUDnSgNe58ADkjdwXOKOgVyGyRqXJBq9aE0HSu/WFRjs KOksOt3/3H1mcqy4aTdPKa2DupyNqy6FjT4w0PjuIMlb+U4TLaQUDfN9m2hLygtnzTcv QPUssVEd6dGPLFmyJVbm3jkhcMB1MVBemZi4QobxRN4oiCjnWf24ZLgRgqf/tTBcSJcD KAUsxbeOQuv2WUSGNdfZdsSIsYlUlxN727culHc1xS0urffpV/1M/L35l1PzSdm2YDzz OpYg== 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:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=yv550UVT8gsG1Pr1zeyKgivao8IT1VyOwmCR3oYjF08=; b=FXtI5GbG8kvbZWS1RT6mDb9lzJwS/mCJhKoiEVcSlT52w9RmH0wcX2UUzcXEMWSbun wbI6+6KiyyTR+E8eCTRCGG0+EjfLh4oQaOGg8LBFjWNrLwgQYZjDlDE17DRCO508s7KK nQZWL2UQ0j3K7e+O/4ir1uJuusZw4RHJiyInZBdY17tYuDTuN1E6T/baS3qKuUgg0LNV fCdcHjrbVwSgRSgtd0cAZFSyxGrORHvKIoKMiOD8zOiqaoJHhKcDvJ3d1tB9Q1Gx7Mps sUmhS1+V4M55ml/X7pcRTTb4LOMPA1F4ZJV7W937N0NdyuIFEXQk2vSCWdJBFv8syeew /S5Q== X-Gm-Message-State: AA6/9Rn9sKikAg6V4Ge0/oiTGRD1oYUQwVTL7dffoCJL2wmzEGlGW86l+Owrv5vB6CLVHQ== X-Received: by 10.98.69.198 with SMTP id n67mr28303024pfi.30.1476577734838; Sat, 15 Oct 2016 17:28:54 -0700 (PDT) Received: from Stas-Air.local (108-233-206-104.lightspeed.sntcca.sbcglobal.net. [108.233.206.104]) by smtp.gmail.com with ESMTPSA id t5sm7555080pfb.58.2016.10.15.17.28.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Oct 2016 17:28:53 -0700 (PDT) To: =?UTF-8?Q?Lauri_Kentt=c3=a4?= , Yasuo Ohgaki References: <12ecd7d8-2c72-d835-a1af-20698ee9885c@gmail.com> <19522e77-7084-57e7-1fb1-e31b1f9d3c89@gmail.com> <5023d189-21de-93a0-b2fc-8fae77fbbe48@gmail.com> <286fe3084638521a3273df037b602ae0@koti.fimnet.fi> Cc: Niklas Keller , PHP Internals Message-ID: Date: Sat, 15 Oct 2016 17:28:52 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <286fe3084638521a3273df037b602ae0@koti.fimnet.fi> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] wordwrap with negative width From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Keeping the current behavior doesn't really cost anything. > Why change it? I think I answered this question several times, including in the email you are quoting! If you disagree, please state the matter of your disagreement, repeating the same question over and over does not help. > It's very easy to imagine a script like this: > > $text_width = $parent_width - $other_width - $margin; > echo wordwrap($text, $text_width); > ?> > > 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. If it was expected to be wrapped but is not, then it would be shown on top of other elements, or break the design layout. Not exactly the best idea. Since calling it with negative argument makes no sense, there's no behavior that makes sense. Producing an error means this nonsense situation is discovered. -- Stas Malyshev smalyshev@gmail.com