Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83101 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2949 invoked from network); 18 Feb 2015 18:10:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 18:10:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=francois@php.net; 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:23466] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/52-25021-B75D4E45 for ; Wed, 18 Feb 2015 13:10:04 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id CDB744B0178; Wed, 18 Feb 2015 19:09:40 +0100 (CET) Reply-To: To: "'Patrick ALLAERT'" , "'Sara Golemon'" , "'PHP internals'" References: In-Reply-To: Date: Wed, 18 Feb 2015 19:09:57 +0100 Message-ID: <036301d04ba6$1b06cff0$51146fd0$@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: AQKz6wpj8b81mnwJq1LfxWbU4ZJyQgJsy61hmxwOx2A= Content-Language: fr X-Antivirus: avast! (VPS 150218-0, 18/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] Scalar Type Hints v0.4 From: francois@php.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) > De : Patrick ALLAERT [mailto:patrickallaert@php.net] > > The biggest advantage, IMHO, is that you get the exact same result = whether > you do: >=20 > foo((int) $value); >=20 > or: >=20 > foo($value); >=20 > ... whatever the mode you are in. Wrong. Parameter parsing rules are much more restrictive than casting = rules. Only 'foo((int)'orange')' would (erroneously) succeed. Fran=C3=A7ois