Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You make it sound like it was a small change. In PHP4, you had to be careful to use references everywhere to get "proper" behavior. To return an object out of collection in your function, it better be both declared with a reference and to use a reference whenever you do an assignment or you won't get what you expect.

The potential for subtle bugs with this change is massive.

Your example is very simple. I've got objects with other objects as properties (composition), collections of objects, hierarchies of object references, as well as methods that take objects by reference or by value. Not using references everywhere is so much easier in PHP4 that whenever possible, I did just that.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: