|
Posted by Toby A Inkster on 03/21/07 22:23
mountain.dog@gmail.com wrote:
> One question - what's the difference between these two
> instances?
> $displayb = new b();
> versus
> $displayb = new b;
In this case, no difference.
You can however, write a class with a constructor function which takes one
or more arguments, in which case the brackets are required:
$displayb = new b('something', 123, 456);
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|