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.
Reference types in PHP
Moderator: General Moderators
Re: Reference types in PHP
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.