Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58831 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84528 invoked from network); 10 Mar 2012 07:45:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Mar 2012 07:45:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.42 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.210.42 mail-pz0-f42.google.com Received: from [209.85.210.42] ([209.85.210.42:46207] helo=mail-pz0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/35-39571-6A60B5F4 for ; Sat, 10 Mar 2012 02:45:43 -0500 Received: by dang27 with SMTP id g27so2513972dan.29 for ; Fri, 09 Mar 2012 23:45:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=tPbkTUDdPB/BfMTDobrMja8wevsgUbe7CIriK4DpPzY=; b=ZcWgKBIJhEC1k/IiAWeESzW+wSF6NVxrRO0dQk0CgM2wAg6rIkhXC5mWjxl4KyUvu3 jLcOMEezTIXAzxcVNl0xvqpyj3hIJbT1PKlPQf+iByzMPsRYAUzi/cx30xkjGlUe8aPC nIzOgW165Vcd+nh0dwnXgZvJ0Ec+AEbKCvDk/NGHtBr8dZHFMGR+jksE4PUwT/CPPYHT wC6RO1qn9XZQvJiCYnIJZdgRYU5i0O6Fhk0Ff4Dyxj4egpWzualCmSS2Eap3gVCFW6+t YL/ldpXZzuI4eriwQ9s8AZwEl5RiL8B8vCjFkUR+/NHXWN8jf6O1zYiA0FcY5lg6ehnU LnrA== Received: by 10.68.197.194 with SMTP id iw2mr8698557pbc.11.1331365539888; Fri, 09 Mar 2012 23:45:39 -0800 (PST) Received: from [192.168.1.104] (bb115-66-192-159.singnet.com.sg. [115.66.192.159]) by mx.google.com with ESMTPS id i3sm5842989pbe.33.2012.03.09.23.45.36 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Mar 2012 23:45:38 -0800 (PST) References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-ID: Cc: Simon Schick , Anthony Ferrara , "internals@lists.php.net" X-Mailer: iPhone Mail (9B179) Date: Sat, 10 Mar 2012 15:45:32 +0800 To: Lazare Inepologlou Subject: Re: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters From: tjerk.meesters@gmail.com (Tjerk Meesters) On 9 Mar, 2012, at 11:20 PM, Lazare Inepologlou wrote: > Type casting combined with passing by reference is problematic in many > ways. Just an example: >=20 > fuction foo( string & $buffer) { ... } > foo( $my_buffer ); >=20 > Here, $my_buffer has just been declared, so it is null. Should this be an > error? I don't know! So, I think that that passing by reference should not= > be (immediately) supported. >=20 Strictly speaking, if you add a type to a referenced variable in that way it= 's only logical that you expect it to have a proper value when the function i= s called. After all, it's not an output type declaration :)