what the different between function and classs

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ms_dos10
Forum Commoner
Posts: 42
Joined: Tue Jul 25, 2006 8:10 am

what the different between function and classs

Post by ms_dos10 »

hi
i wanna know what the different between function and classs ? :?:

at all , give me all the faces ! :!: [/b]
jamiel
Forum Contributor
Posts: 276
Joined: Wed Feb 22, 2006 5:17 am
Location: London, United Kingdom

Post by jamiel »

Class is a means of grouping your functions to create and manipulate an object. A Function is just a function.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

A function is just that, a function. Classes are a collection of functions into a, normally, logical unit.
ms_dos10
Forum Commoner
Posts: 42
Joined: Tue Jul 25, 2006 8:10 am

Post by ms_dos10 »

thanx all i know that but i want more than that can u give me ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
ms_dos10
Forum Commoner
Posts: 42
Joined: Tue Jul 25, 2006 8:10 am

Post by ms_dos10 »

yes that what i wanna

where give me link or address be cause i'm new here tell me
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Points to the link to the PHP manual in my signature..
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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."
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Post 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Re: what the different between function and classs

Post 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
ms_dos10
Forum Commoner
Posts: 42
Joined: Tue Jul 25, 2006 8:10 am

Post by ms_dos10 »

thanx for everyone i got what i want
Post Reply