ObjectsAndRefs

From Hashphp.org
Revision as of 15:23, 26 July 2011 by TML (Talk | contribs)

Jump to: navigation, search

This page attempts to provide a visual guide to how objects - and references to them - work in PHP 5.0 and later.

$instance = new SimpleClass(); ObjRefImg0.png
$assigned = $instance; ObjRefImg1.png
$reference =& $instance; ObjRefImg2.png
$instance->var = '$assigned will have this value'; ObjRefImg3.png
$instance = null; ObjRefImg4.png