NYCPHP Meetup

NYPHP.org

[nycphp-talk] working with a PHP class - help!

Hans Zaunere hans at nyphp.org
Mon Sep 8 11:27:02 EDT 2003



Phil Powell wrote:

> My first time working with a PHP class, and after 6 hours of working out 
> the kinks I am unable to return a value from the class, so now I appeal 
> to the general audience what on earth did I do wrong this time?

I think you'll need to step back and revisit the code.  There's nothing special about return a value from a class method (in this case anyway).  However:  

>     $registrationNumber = $regNumberGenerator->getRegNumber();

When I examine the code you posted, that function is only defined as:

   function getRegNumber() {
    return $regNumber;
   }

Which doesn't do anything.

H






More information about the talk mailing list