Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57579 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34865 invoked from network); 30 Jan 2012 16:27:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2012 16:27:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.170 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.215.170 mail-ey0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:33355] helo=mail-ey0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/C9-53934-9E4C62F4 for ; Mon, 30 Jan 2012 11:27:22 -0500 Received: by eaaa12 with SMTP id a12so635849eaa.29 for ; Mon, 30 Jan 2012 08:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=3o57v24pB8LFe4BzcikzatbXBoo4EFhFwgAHYRxwXpA=; b=fvgd5zSdOdEttL5rZXUK6uSA5NLlXUY3T4r/CICSAG7DxdydEFZMCPkoS6LQ/ywvHH y0fl1zuF2oxIIyk1ZpFAC6Bcqn+EWS3Gzvj/niKltBlOzUPc55+Zdee7gtPdVLIL3FSA 2uN3bvtuslb8vigwox9PVG533L957QuMlQNf0= Received: by 10.213.31.208 with SMTP id z16mr2986059ebc.47.1327940838378; Mon, 30 Jan 2012 08:27:18 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.213.106.12 with HTTP; Mon, 30 Jan 2012 08:26:38 -0800 (PST) In-Reply-To: <1327939911.10337.YahooMailNeo@web43510.mail.sp1.yahoo.com> References: <1327939911.10337.YahooMailNeo@web43510.mail.sp1.yahoo.com> Date: Mon, 30 Jan 2012 17:26:38 +0100 X-Google-Sender-Auth: jvAvoU2KdROhJtqsmKRyCg0zdW8 Message-ID: To: Adi Mutu Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=0015174c11fcf44b2e04b7c151dc Subject: Re: [PHP-DEV] zend guard From: jpauli@php.net (jpauli) --0015174c11fcf44b2e04b7c151dc Content-Type: text/plain; charset=ISO-8859-1 Quickly reading the source and trying things, I suggest its a guard against recursion in __get and __set handlers. This way, code such this one won't infinitly loop : class Foo { public function __get($p) { return $this->$p; // this should lead to a recursion loop } } $f = new Foo; echo $f->barbaz; http://lxr.php.net/opengrok/xref/PHP_5_4/Zend/zend_object_handlers.c#440 http://lxr.php.net/opengrok/xref/PHP_5_4/Zend/zend_object_handlers.c#zend_get_property_guard http://lxr.php.net/xref/PHP_5_4/Zend/zend.h#290 Julien.P On Mon, Jan 30, 2012 at 5:11 PM, Adi Mutu wrote: > Hello, > > Can anybody tell me what this struct is used for ? > I'm new to the internals of php. > > Thanks, > A > --0015174c11fcf44b2e04b7c151dc--