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 <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.

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]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to