Reference types in PHP

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
Anitha Raman
Forum Newbie
Posts: 1
Joined: Tue Aug 18, 2009 12:44 am

Reference types in PHP

Post by Anitha Raman »

I am working on finding the Coupling between objects for a PHP class. (Represents the number of other classes to which a class is coupled to. Counts the number of reference types that are used in attribute declarations, formal parameters, return types, throws declarations, local variables, and types from which attribute and method selections are made.)

Can anyone give a example of how refernce types are created in PHP.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Reference types in PHP

Post by requinix »

I get the feeling you don't know what you're talking about.

Have fun.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Reference types in PHP

Post by Weirdan »

Anitha, there's no reference type in the sense you're talking about. Instead we have objects in php. And since PHP is dynamically typed language the kind of problem you're trying to solve is generally unsolvable. In a dynamically typed language you can't know the type of a variable (that would be class name for objects) for sure until you actually execute the code.
Post Reply