• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 362
  • Last Modified:

references and variables. Explaining the terms

http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/A_12310-PHP-Variables-and-References.html

Is a great tutorial
which links to a good example
http://php.net/manual/en/language.oop5.references.php#101900

What are real world explanations for all the terms
references
variables
values
clones
1
rgb192
Asked:
rgb192
1 Solution
 
n2fcCommented:
Explanations as follows:
1) References: Think of these as pointers to or address locations of variables or objects

2) Variables:  These are symbols that contain values that can be modified by assignment

3) Values:  These are what are CONTAINED in variables...   These are the "right side" of assignment statements and are used to modify variables

4) Clones: Clones are copies of objects as distinct new objects... Normally an object assignment would result in a reference to the original object (another pointer to the same thing)... When you make a clone, you create another object, copied from the original
1
 
Ray PaseurCommented:
What n2fc said!  Originally PHP was intended to be the "easiest programming language to learn," but the plain truth is that programming languages are formal and structural, and none of them are really easy to learn well.  Sometimes it's a matter of making numerous teaching examples, and experimenting with them over and over -- making small changes and observing the different behaviors.
0
 
rgb192Author Commented:
thanks for explaining terms.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now