Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66517 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92713 invoked from network); 7 Mar 2013 08:53:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2013 08:53:32 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 173.203.6.131 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 173.203.6.131 smtp131.ord.emailsrvr.com Linux 2.6 Received: from [173.203.6.131] ([173.203.6.131:57806] helo=smtp131.ord.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/01-20037-C8558315 for ; Thu, 07 Mar 2013 03:53:32 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp25.relay.ord1a.emailsrvr.com (SMTP Server) with ESMTP id 28BB83F0094; Thu, 7 Mar 2013 03:53:29 -0500 (EST) X-Virus-Scanned: OK Received: by smtp25.relay.ord1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id A8D613F00BC; Thu, 7 Mar 2013 03:53:28 -0500 (EST) Message-ID: <51385587.6050104@sugarcrm.com> Date: Thu, 07 Mar 2013 00:53:27 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130216 Thunderbird/17.0.3 MIME-Version: 1.0 To: Sebastian Krebs CC: Bob Weinand , PHP Mailing List Developers References: <5137D21C.1050907@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] unset(): return bool if the variable has existed From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Shouldn't this fail a little bit more obvious (-> "loud")? And how is > this even possible? Well, for example - __unset is required to do X before unsetting variable but X fails for one reason or another and the logic dictates that you can not unset unless X is done (for a real life example, try exiting an app like word processor with content unsaved and when it asks you to save/discard/cancel, click on cancel. Bingo - unset interrupted :). > or there was > nothing to unset (i.e., it is still not set)? > > > So I guess this is the only useful behaviour. However, I have no idea, This behavior is already covered by isset, why duplicate it? If - and I have no idea why - you cared if the variable was set or not, why not just do isset? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227