Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64536 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72203 invoked from network); 4 Jan 2013 23:44:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2013 23:44:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:45286] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/F4-38386-37967E05 for ; Fri, 04 Jan 2013 18:44:51 -0500 Received: by mail-ob0-f174.google.com with SMTP id ta14so15234502obb.19 for ; Fri, 04 Jan 2013 15:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2Ph5kj4Xbw+jlIhT98+ch3thHN1ah47zB2P9hm2CRQM=; b=s4SX2siNY6vQn0UH69ebKoqRKrZ0EcTUNSR7I2zweu/EHjZX793mtT5U9ndhbQTVGf eeMXRZEmYHD+9h0GqDpqBZygI449/2nr97I8c8zRK5RjfpHjGtqttkUajNiVieA/0qPa 6GBwD6DVZ9jjlCW10Cr3skvQwtz4CVUo60Ghz9DRbTLM/WqQ6YO48jsPOrS+LcYpPEwY 3pDMmFmUW2g2BKN7rrtkjvstPOkICePNIRfzH2FRwCa8kjXcMINQ7kzEdO62joTT1mzJ Presl1j2ommzOB6aSEx8177sNE/f07TKSuPvFYP9apMrCiGbn7kaIgZqgtmojJmu7vNr xMNA== MIME-Version: 1.0 Received: by 10.182.194.2 with SMTP id hs2mr39813013obc.97.1357343088670; Fri, 04 Jan 2013 15:44:48 -0800 (PST) Received: by 10.76.82.234 with HTTP; Fri, 4 Jan 2013 15:44:48 -0800 (PST) In-Reply-To: References: <19D80B01-BE88-4119-8A15-B631A96060E5@mrclay.org> Date: Fri, 4 Jan 2013 16:44:48 -0700 Message-ID: To: Steve Clay Cc: Nikita Popov , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Alternative typehinting syntax for accessors From: morrison.levi@gmail.com (Levi Morrison) On Fri, Jan 4, 2013 at 4:34 PM, Levi Morrison wrote: >>We should also consider how an author would allow type-hinted properties to accept NULL as a new value, in both proposals. > > public $foo { > get; > set(Foo $value = NULL) { $this->foo = $value; } > } > > Would work for traditional type-hints. I just realized that `unset` would actually have a use here. Rather than setting something to `null` you would `unset` it.