Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63947 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57691 invoked from network); 17 Nov 2012 15:04:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2012 15:04:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:53013] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/26-08060-D67A7A05 for ; Sat, 17 Nov 2012 10:04:13 -0500 Received: by mail-lb0-f170.google.com with SMTP id j14so2934778lbo.29 for ; Sat, 17 Nov 2012 07:04:10 -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=thDxhH7yX3nSs2COJ3GhXnBcmwHjXNZmcVNYgtyvYiQ=; b=YBmFrB9ZQh56LyGENPHo6S8XX0EWi8nlRip+8qBM6IO2h59LQRjy8PJLXN+WONOp1R p8e433iyz15CWWc2kOYzJ1RESrj3U3yh/tZz9Rpt6Dmz5w22VNRIHckVQ2en93/MT7eL bBM96rdA58aQgEWtCy5o14iOtnLZ8t9KBOZbvILxgrEzfYBQdV5PXW3LkeQvFS2bj1re mWs/u6SqrDDpS0XhS5zJbAZ1ybIpivATSjdOFGAGCN78ZvAU7jImW+OR8ObJhwaod10q OLqHVZo0Oof7yJOAk4KZtIAH2DjlEiAo/xbUjYZXH505Try7iI9f+qwspqal6hTkiW5L xeSw== MIME-Version: 1.0 Received: by 10.152.133.140 with SMTP id pc12mr7044606lab.53.1353164650054; Sat, 17 Nov 2012 07:04:10 -0800 (PST) Received: by 10.112.83.100 with HTTP; Sat, 17 Nov 2012 07:04:09 -0800 (PST) In-Reply-To: <1353161100.65208.YahooMailNeo@web162903.mail.bf1.yahoo.com> References: <1353161100.65208.YahooMailNeo@web162903.mail.bf1.yahoo.com> Date: Sat, 17 Nov 2012 16:04:09 +0100 Message-ID: To: Adi Mutu Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary=f46d042dfe994a058b04ceb232b2 Subject: Re: [PHP-DEV] questions about php structures From: nikita.ppv@gmail.com (Nikita Popov) --f46d042dfe994a058b04ceb232b2 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Nov 17, 2012 at 3:05 PM, Adi Mutu wrote: > Hello, > > Got a few questions if anybody can help me out: > > 1) what's the difference between zend_object and zend_object_value? what > is each for? Because i'm confused.. > 2) What are zend_object_store_bucket; and zend_object_store used for? > > Thanks, > A. A zend_object_value is what is saved in the zval. It has an object handle (an integer uniquely identifying the object) and a structure with object handlers (which are used whenever you interact with the object). The object handle can be used to get the object data from the object_store. The object_store is basically a dynamic array of zend_object_store_buckets. The buckets contain the object data, as well as handlers for dtor/free/clone and some other stuff. The default object structure stored in the object store is a zend_object. It contains the class entry, properties and recursion guards. It is also possible to put a custom object structure into the store, but even in that case zend_object will be the first part of the structure. Nikita --f46d042dfe994a058b04ceb232b2--