Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96904 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73709 invoked from network); 16 Nov 2016 00:00:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2016 00:00:18 -0000 Authentication-Results: pb1.pair.com header.from=daniel@honestempire.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=daniel@honestempire.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain honestempire.com designates 66.111.4.26 as permitted sender) X-PHP-List-Original-Sender: daniel@honestempire.com X-Host-Fingerprint: 66.111.4.26 out2-smtp.messagingengine.com Received: from [66.111.4.26] ([66.111.4.26:36812] helo=out2-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/F7-05303-D81AB285 for ; Tue, 15 Nov 2016 19:00:14 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2DB1B21867 for ; Tue, 15 Nov 2016 19:00:10 -0500 (EST) Received: from web6 ([10.202.2.216]) by compute4.internal (MEProxy); Tue, 15 Nov 2016 19:00:10 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=honestempire.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=OXqNjTRrqjEmoGyS40j+t2OYjH U=; b=f8edf2dJk7Wq51s3EeUDH3mk4AGdNs4XslV2a4q9dCeuka0OzUnBNKECuL 4synL8kU6o15p7juUXkfo/meI1vG51RMgyXG7Mn9iexZGhkgDDZqMgDrrk2PsfKA uGpiWdhqqUQKdi+M2ORUEyhaOkWpGEdK6MIrwkrOmcqdeAn6E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=smtpout; bh=OX qNjTRrqjEmoGyS40j+t2OYjHU=; b=LwJM8+eRGVRbN7StHESTU3ZZ2sQ6mbwdIY fniA0OwbN3ulC6dehwBN67XuRKy4HzpBiX3Vx/QAl14Fo8mn0LBtxjApjIRHHsEK N7wItmacfdC4TGAztqamJa0yPCxC9iePlpymhv9YRvbtdQmbB1YKGi3MReG5+Lwq Maeu/NJKQ= X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id D91785087; Tue, 15 Nov 2016 19:00:09 -0500 (EST) Message-ID: <1479254409.563911.789059065.16D4C9A4@webmail.messagingengine.com> To: internals@lists.php.net MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-461bce03 Date: Wed, 16 Nov 2016 00:00:09 +0000 In-Reply-To: References: Subject: Re: [PHP-DEV] Type locked variables From: daniel@honestempire.com (Daniel Morris) On Tue, 15 Nov 2016, at 11:44 PM, Michael Morris wrote: > Note this would simplify one of the use cases of setters - insuring the > class member is of a valid type. It's already possible to ensure within a setter that the variable is of a specified type, you only need to make the instance variable private and scalar type hint the method arguments within the setter (provided that strict_types is set), I think this would be more likely to lead to code littered with calls to unset rather than to provide much benefit, and as far as I'm aware, there's no real performance benefit that can be gained from this as of yet since the variables will still be a zval internally. -- Daniel Morris daniel@honestempire.com