Re: note 93418 rejected from functions.anonymous by nicobn

From: Date: Wed, 03 Nov 2010 21:48:11 +0000
Subject: Re: note 93418 rejected from functions.anonymous by nicobn
References: 1 2  Groups: php.notes 
Request: Send a blank email to php-notes+get-173732@lists.php.net to get a copy of this message
Nicolas; Just a heads-up: when managing user notes, we use the 'delete: other reasons' option via the email or interface, or the delete button (the "X") on the note itself for any note which wasn't submitted with a real (or seemingly real) email address. Rejection attempts to dispatch a rejection notice to the submitter via the email address they sent, which then gets hung up in the server until it expires. It's a bug that should be fixed, but we've just been working around it without giving it a second thought. On Wed, Nov 3, 2010 at 17:45, <nicobn@php.net> wrote: > Note Submitter: Jaakko Salmela > > ---- > > <?php > /** >  * Using closures to dynamically extend objects >  * >  */ > class ClosureTest{ > >        public $member = 'test'; >        protected $protectedMember = 'protectedtest'; > >        public function __call($method, $args) >    { >        return call_user_func_array( $this->$method, $args); >    } > > > } > > $object = new ClosureTest(); > $object->closure = function() use ($object){ >        return $object->member; > }; > > echo $object->closure(); > //Output: 'test' > > /** >  *  This won't work, you can not access protected/private members, which is fine. > */ > $object->closureAccessProtected = function() use ($object){ >        return $object->protectedMember; > }; > $object->closureAccessProtected(); > > ?> > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- </Daniel P. Brown> Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/

« previous php.notes (#173732) next »