Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69996 invoked from network); 28 Feb 2015 08:51:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2015 08:51:48 -0000 Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:13729] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/B1-59402-4A181F45 for ; Sat, 28 Feb 2015 03:51:48 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id B78C94B022A; Sat, 28 Feb 2015 09:51:20 +0100 (CET) Reply-To: To: "'Damien Tournoud'" , "'Lester Caine'" Cc: References: <4ED7146272E04A47B986ED49E771E347D3111ACD71@Ikarus.ameusgmbh.intern> <54F0AE90.4020508@lsces.co.uk> In-Reply-To: Date: Sat, 28 Feb 2015 09:51:39 +0100 Message-ID: <0bc801d05333$c47fed20$4d7fc760$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHbEgvqZ08kgCvmYfG4mXODzCFejgJ+MtDZAYeWnXgB0KU8cwGzz0qoAYe9l+mcp7EbIA== Content-Language: fr X-Antivirus: avast! (VPS 150227-0, 27/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] Coercive STH - some real world tests and updated RFC From: francois@php.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) > De : Damien Tournoud [mailto:damz@damz.org] > > But anyway, that's not even the point. The point is that return values = that > "worked" in a world of transparent type-jungling will not work in a = world > of stricter typing checks. Which means that we need: >=20 > (1) To accept that for now casting FALSE to the empty string is the = right > thing to do; No. Add an explicit for false. We want programs to be cleaner, not = encourage casting. >=20 > until / unless: >=20 > (2) We fixed all the common functions in the standard library so that = they > stop returning inconsistent types, in particular in the cases where it > should not even be a debate what is the right thing to do (for substr, = if > the arguments point to an empty slice, return the empty string). That's history. Propose an RFC to fix substr() behavior (good luck :) Yes, we propose to deprecate potentially-problematic behaviors. That's = not because we are running behind Anthony's RFC, as some may believe, = but we sincerely think, at the end, it will bring more good than bad to = PHP overall. You will have at least 5 years to fix your code. PHP is = evolving. You like it or not. If you don't, you vote against the = feature. That's democracy, which is not always the case for other = languages. Can I say more ? Fran=C3=A7ois