Translations:Developers/Object oriented programming in PHP/Classes/2/en

A big advantage of classes is, that there's no need to deliver data as parameters to a method of a class. The method itself "knows" which data, i.e. objects, belongs to it. Whereas for a function all data it's supposed to process must be delivered as parameters. Nevertheless, methods can be defined to accept parameters in order to configure the processing of the object properties or to do something else.