Re: Class constructor behaviour
| From: | Tony Marston | Date: | Mon, 19 Jan 2015 09:54:22 +0000 |
| Subject: | Re: Class constructor behaviour | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80784@lists.php.net to get a copy of this message | ||
"Rowan Collins" wrote in message news:CALKiJKqpk7X0yn0d_PWOKU1S7m156dF7865aLCP5dLF=q39uWg@mail.gmail.com...
On 18 January 2015 at 11:28, Tony Marston <TonyMarston@hotmail.com> wrote:<<snip>>"Andrea Faulds" wrote in message news:23490588-0131-4B0F-A7AA- C9C8C766626C@ajf.me...
Before you can use an object you must instantiate it using "$object = new <classname>". 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. -- Tony MarstonYou 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"?