Re: Class constructor behaviour

From: 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 [email protected] 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 <[email protected]> wrote:
"Andrea Faulds" wrote in message news:23490588-0131-4B0F-A7AA- [email protected]...
<<snip>>
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 <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 Marston

Thread (19 messages)

« previous php.internals (#80784) next »