Solved

a a p

Posted on 2014-01-24
5
141 Views
Last Modified: 2014-01-25
Without separate php.net links what is difference / similarly method arguments, class attributes and parameters
0
Comment
Question by:rgb192
  • 3
  • 2
5 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39807656
Method arguments are the variables that are passed to the methods (functions) of a class.  Example here, where $x is an argument to the Thing constructor

Class Thing
{
    public function __construct($x) { ...
}

Class member variables are called "properties". You may also see them referred to using other terms such as "attributes" or "fields", but for the purposes of the PHP reference we call them "properties".

Parameters is another term often used for function or method arguments.  There is some overlap in the terminology.
0
 

Author Comment

by:rgb192
ID: 39809242
okay I still do not understand 'parameters'

should I stop using this word

and ask for clarification whenever I hear/see word 'parameters'
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39809263
These are equivalent statements and appropriate uses of argument and parameter.

function thing($argument1, $argument2)
function thing($parameter1, $parameter2)
0
 

Author Closing Comment

by:rgb192
ID: 39809299
I will avoid using the word parameter and instead use argument. Thanks
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39809307
You'll be fine with that terminology.  Thanks for the points! ~Ray
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now