[thelist] PHP n00b

Kevin Timmins kipper_timmins at yahoo.co.uk
Fri Jan 4 13:04:27 CST 2008

HI there,
In my humble opinion, PHP is a great language, however it wouldn't be my
choice of language to learn oop with. Have you done any Object Oriented
Programming before? When i learnt ph pi read a book by Kevin Yank, its
probably still in circulation now, and i have also bought the php and mysql
for dummies, an absolute must read for programming in php purely for the
I learnt/am learning oop in java and from there i am going to apply that
knowledge to php, it seems to be working for me so far. However if you wish
to just use php to learn oop then you might like to look at www.hudzilla.org
i think the address is. It has a free very extenisive wiki on PHP, which is
absolutely amazing, i think that if you wade your way through it you should
pretty much know alot of all there is to know.
Good luck in your php adventure, i love to programme in it. Although am
having designers block atm :P
Good luck

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Kevin Stevens
Sent: 04 January 2008 16:38
To: thelist at lists.evolt.org
Subject: [thelist] PHP n00b

I'm looking for a job in web design and a friend recommended I learn PHP 
because it I'm more likely to find something with that skill than the 
ASP I already know. But, quite frankly, I'm struggling a bit. I bought 
the latest O'Reilly book http://www.oreilly.com/catalog/9780596514013/ 
but I'm not finding that it explains things very well. One of the 
examples of code is below...


class cat
          var $age;
          function cat($now_age) { $this->age = $now_age; }
          function birthday() { $this->age++; }
$fluffy = new cat(1);
echo "Age is $fluffy->age <br>";
echo "Birthday<br>";


echo "Age is $fluffy->age <br>";

Could somebody tell me if my understanding of this is correct please. 
The piece of code '$this->age = $now_age' is what is baffling me

1. I am declaring $age as a variable
2. Presumably I cannot use a variable as a parameter of a function, so 
'$this->age = $now_age' effectively puts the value of the variable into 
the parameter. Is this right?

If I am correct it seems a pretty ar$e-about-face way of doing things, 
the purpose of which will no doubt be revealed to me at some later date

Thanks, and a (belated) Happy New Year to you all :)

Kevin Stevens


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 

More information about the thelist mailing list