?
Solved

a a p

Posted on 2014-01-24
5
Medium Priority
?
148 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 111

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 111

Accepted Solution

by:
Ray Paseur earned 2000 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 111

Expert Comment

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

777 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