Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23232 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12220 invoked by uid 1010); 10 May 2006 19:26:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 12204 invoked from network); 10 May 2006 19:26:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 May 2006 19:26:46 -0000 X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:25283] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 85/37-19568-67E32644 for ; Wed, 10 May 2006 15:26:46 -0400 Received: (qmail 20925 invoked from network); 10 May 2006 19:26:37 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 10 May 2006 19:26:37 -0000 Message-ID: <44623E75.4070304@zend.com> Date: Wed, 10 May 2006 23:26:45 +0400 User-Agent: Thunderbird 1.5.0.2 (X11/20060420) MIME-Version: 1.0 To: Ralph Schindler CC: internals@lists.php.net References: <446222C8.3090101@smashlabs.com> In-Reply-To: <446222C8.3090101@smashlabs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP6 OOP compiler feature question / request From: antony@zend.com (Antony Dovgal) __isset() and __unset() methods are what you're looking for. They are available since 5.1.0. See http://www.php.net/manual/en/language.oop5.overloading.php On 10.05.2006 21:28, Ralph Schindler wrote: > Architectural restrictions aside, is it far off to ask if something like > this could be possible in PHP6: > > > class TestReservedKeywordMethods > { > public $value = "2"; > > public function isset() > { > if (is_null($this->value)) > return false; > else > return true; > } > > public function unset() > { > $this->value = 0; > } > > } > > $test = new TestReservedKeywordMethods(); > $test->isset(); > $test->unset(); > > ?> > -- Wbr, Antony Dovgal