Polymorphism

In reply to dave_59:

Hi Dave,
Even if I construct another object of p_tr by p_tr = new(), the behaviour is the same.
$cast(c_tr, p_tr) is equivalent to saying c_tr = p_tr;
c_tr should point to p_tr and should display the contents of p_tr which is data=10 and id=1
Why is it still not displaying contents of p_tr which is data=10 and id=1
Thanks,
JeffD