Im sure you should be returning a value in your constructor at all?? Ill check the manual, but i dont think ive ever seen a constructor return anything, doesnt sound right.. Let me check.
Jason "Jed R. Brubaker" <[EMAIL PROTECTED]> wrote: > > Hi all. As the subject suggests, I am using PHP4 and am having something > going on that I don't think should be. > > Presume the following code > class Foo { > function Foo () { > return "Bar"; > } > } > $foo = new Foo; > echo $foo; > > $foo comes out as an object. Does this have to be done in two line like > this?: > class Foo { > function bar () { > return "Bar"; > } > } > $foo = new Foo; > $bar = $foo->bar; > > Or is there a better design approach I should be reminded of or learn? > > Thanks in advance! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php