php 5.1.6 magic __toString method

Posted by NachoF on Stack Overflow See other posts from Stack Overflow or by NachoF
Published on 2010-05-25T05:16:39Z Indexed on 2010/05/25 5:21 UTC
Read the original article Hit count: 289

Filed under:
|
|

In codeigniter Im trying to use this plugin which requires I implement a toString method in my models. My toString method simply does

return $this->name

On my local machine with php 5.3 everything works just fine but on the production server with php 5.1.6 it shows "Object id#48" where the value of the name property of that object should appear..... I found something about the problem here but I still dont understand... How can I fix this?

© Stack Overflow or respective owner

Related posts about php

Related posts about tostring