Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80806 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45304 invoked from network); 19 Jan 2015 11:35:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2015 11:35:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.182 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:43844] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/FF-64889-AEBECB45 for ; Mon, 19 Jan 2015 06:35:06 -0500 Received: by mail-wi0-f182.google.com with SMTP id n3so13996064wiv.3 for ; Mon, 19 Jan 2015 03:35:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ru7T6t7kXBCtb48DrDU/si///YMY8Ny16rEanU/5wHk=; b=BYawlojrj5GyhN/wBN6UtJVabAXc6UwVcjZRQuvIbF3gSyvXkFDJRCVPAxRnaDCE5V 48/aE4oijSXj9ONiikfTBRD9F0Zoe9/VADTE25ZVl/qKSdp7WQLchYoZy8hAmDO9vKZK PPfJOgX3dChcajGBo69MMgH21AzT08pYuA8p3yo7Wgw4XY+76egRgUJaM+OLVyx9y9XV GvGIi1JjfKZLqY6+R9a3mhqPDncvXXzZZsJnCtwkiGtgoMPyJOvTW+zPwA6uGuJJSHPk F8Cqm++v3KVkw5AiHysHJ26fS+i538IW+21CE2j2xLAcYiN5g//M9a9baAh9WwR0QINk NgFg== X-Received: by 10.180.73.170 with SMTP id m10mr35157728wiv.72.1421667303539; Mon, 19 Jan 2015 03:35:03 -0800 (PST) Received: from [192.168.0.172] ([62.189.198.114]) by mx.google.com with ESMTPSA id hz9sm16936572wjb.17.2015.01.19.03.35.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jan 2015 03:35:02 -0800 (PST) Message-ID: <54BCEBBB.4030303@gmail.com> Date: Mon, 19 Jan 2015 11:34:19 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <003201d0326b$6fd27f60$4f777e20$@tekwire.net><23490588-0131-4B0F-A7AA-C9C8C766626C@ajf.me> <67.C6.64889.1D6DCB45@pb1.pair.com> In-Reply-To: <67.C6.64889.1D6DCB45@pb1.pair.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Class constructor behaviour From: rowan.collins@gmail.com (Rowan Collins) Tony Marston wrote on 19/01/2015 09:54: >>> >>> You are forgetting one minor thing - an object may be instantiated >>> from a >>> piece of procedural code. In fact the very first object can only be >>> instantiated from procedural code. >> >> >> I'm not sure what you mean by the second sentence here; which is the >> "very >> first object"? > > Before you can use an object you must instantiate it using "$object = > new ". For the very first object this line can only be > performed in procedural code. It cannot be perform within the first > object as the first object must be instantiated externally. Ah, I see, yes. I don't think that's what was meant by "procedural code" in this case, though. We were talking about extensions which either represent all their functionality procedurally (as with file I/O, for instance), or which include a procedural wrapper for those not comfortable with OO (such as mysqli). The point being that these functions are implemented in a different style, including their error-handling conventions. Regards, -- Rowan Collins [IMSoP]