Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63966 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97537 invoked from network); 19 Nov 2012 05:08:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2012 05:08:57 -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.147 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 173.203.6.147 smtp147.ord.emailsrvr.com Linux 2.6 Received: from [173.203.6.147] ([173.203.6.147:46222] helo=smtp147.ord.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/41-18536-7EEB9A05 for ; Mon, 19 Nov 2012 00:08:56 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp23.relay.ord1a.emailsrvr.com (SMTP Server) with ESMTP id 35D641C80AD; Mon, 19 Nov 2012 00:08:52 -0500 (EST) X-Virus-Scanned: OK Received: by smtp23.relay.ord1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id B22A51C80A7; Mon, 19 Nov 2012 00:08:51 -0500 (EST) Message-ID: <50A9BEE3.4040904@sugarcrm.com> Date: Sun, 18 Nov 2012 21:08:51 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Adi Mutu CC: PHP Developers Mailing List References: <1353161100.65208.YahooMailNeo@web162903.mail.bf1.yahoo.com> In-Reply-To: <1353161100.65208.YahooMailNeo@web162903.mail.bf1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] questions about php structures From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > 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? It may be easier to look at it this way: For the engine, the object is an abstraction, which has an ID and a set of handlers (see zend_object_handlers structure). That's how the engine talks to the objects. That's what zend_object_value is. These objects can be, in theory, anything. In practice, all user-space objects (as opposed to objects that may be created by the engine) are something that we can call "standard Zend engine objects". These objects are created from Zend Engine classes, have properties, etc. - that's what zend_object stores. These objects are kept in the "object store" and each time you create one it gets stored there and receives a store ID. That's the ID the rest of the engine (see above) uses to talk to the object. Note that custom objects (not standard ones) also can be kept in the store, but do not have to be. Keeping them in the store saves some work though - because you'd have to keep them somewhere anyway... zend_object_store_bucket is just a data structure used in the maintenance of the store - it contains the actual object data and some service values that are needed to efficiently manage store memory. You may also check out Zend/OBJECTS2_HOWTO file in PHP source - it has some more details. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227