Forum Moderators: coopster

Message Too Old, No Replies

php class syntax

         

spritch2

3:56 am on Nov 24, 2004 (gmt 0)

10+ Year Member



if Mail.php is a class file from pear and $sender becomes an new object can anyone explain the following syntax:-

$sender =& Mail::factory('mail');

the book i'm reading doesnt explain the difference between the above and the usual way of creating an instance

thanks
spritch2

ps forgot to mention Mail.php is included further up the script

spritch2

5:26 am on Nov 24, 2004 (gmt 0)

10+ Year Member



ahh, got it

Create the mail object using the Mail::factory method

was getting stuck on the =& ..too tired to realise what i was lookin at!

spritch2

coopster

12:10 pm on Nov 24, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Glad you got it spritch2. You were looking at a reference. References Explained [php.net].