Page 1 of 1

what the different between function and classs

Posted: Tue Jul 25, 2006 8:27 am
by ms_dos10
hi
i wanna know what the different between function and classs ? :?:

at all , give me all the faces ! :!: [/b]

Posted: Tue Jul 25, 2006 8:30 am
by jamiel
Class is a means of grouping your functions to create and manipulate an object. A Function is just a function.

Posted: Tue Jul 25, 2006 8:30 am
by feyd
A function is just that, a function. Classes are a collection of functions into a, normally, logical unit.

Posted: Tue Jul 25, 2006 9:50 am
by ms_dos10
thanx all i know that but i want more than that can u give me ?

Posted: Tue Jul 25, 2006 10:00 am
by feyd
You need to be more specific with your question then. This subject has been talked about before in the Theory board, I believe.

Posted: Tue Jul 25, 2006 10:02 am
by ms_dos10
yes that what i wanna

where give me link or address be cause i'm new here tell me

Posted: Tue Jul 25, 2006 10:03 am
by Benjamin
Points to the link to the PHP manual in my signature..

Posted: Tue Jul 25, 2006 10:14 am
by feyd
Normally, I'd want you to look for it, but I'll be nice today.

viewtopic.php?t=37995
viewtopic.php?t=37020
viewtopic.php?t=30746
viewtopic.php?t=27682
viewtopic.php?t=26168
viewtopic.php?t=11048

If you want to see all the threads I found, this was the search terms: "proced* function* class*" with "Search for all terms" selected, and forum being "PHP - Theory and Design."

Posted: Tue Jul 25, 2006 10:19 am
by bokehman
Just to avoid some potential confussion if you are going to start reading up on OOP: a function within a class is written in a way and also appears to be almost identical to a user defined function within procedural code but in this context it is now called a "method", not a function.

Re: what the different between function and classs

Posted: Tue Jul 25, 2006 10:36 am
by timvw
ms_dos10 wrote: i wanna know what the different between function and classs ? :?:
You would need to lookup the defintion of both keywords:

http://be2.php.net/manual/en/language.functions.php
http://be2.php.net/manual/en/language.o ... word.class

Posted: Tue Jul 25, 2006 2:28 pm
by ms_dos10
thanx for everyone i got what i want