Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23105 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81773 invoked by uid 1010); 3 May 2006 06:24:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 81757 invoked from network); 3 May 2006 06:24:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2006 06:24:46 -0000 X-PHP-List-Original-Sender: bfoz@bfoz.net X-Host-Fingerprint: 63.240.77.84 sccrmhc14.comcast.net NetCache Data OnTap 5.x Received: from ([63.240.77.84:61256] helo=sccrmhc14.comcast.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id A1/5F-31513-EAC48544 for ; Wed, 03 May 2006 02:24:46 -0400 Received: from [192.168.0.5] (c-24-6-134-233.hsd1.ca.comcast.net[24.6.134.233]) by comcast.net (sccrmhc14) with ESMTP id <20060503062442014001uq7re>; Wed, 3 May 2006 06:24:42 +0000 Message-ID: <44584CA9.2040609@bfoz.net> Date: Tue, 02 May 2006 23:24:41 -0700 User-Agent: Thunderbird 1.5.0.2 (X11/20060430) MIME-Version: 1.0 To: internals@lists.php.net X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: zend_class_entry.create_object From: bfoz@bfoz.net (Brandon Fosdick) When registering a new class, what are the consequences of setting zend_class_entry.create_object = NULL? INIT_CLASS_ENTRY() defaults it to NULL, but the tutorial I'm looking at sets it to the address of a function immediately afterwards. My concern is that setting this allows the engine to call a constructor-like-function behind my back. I'd rather handle such things while handling calls to new(). Is that possible? Is it even a good idea? The tutorial code provides a function for zend_class_entry.create_object that returns a populated zend_object_value. Presumably that's a useful thing to do, and if I don't have a function there I would need to find some other means of supplying the zend_object_value to the engine. Can I do that in a new() handler? How?