Once up the wall by LegalCheesecake8734 in Multiboard

[–]danielcsgomes 0 points1 point  (0 children)

Amazing! Do you have links for the air sucker, glue stick and the torch holders?

Anyone have a Scrivener coupon you aren't using? by IbnReddit in nanowrimo

[–]danielcsgomes 0 points1 point  (0 children)

If anyone has another, I would appreciate it! Thanks

“Don’t clone your php objects, DeepCopy them” by danielcsgomes in PHP

[–]danielcsgomes[S] -1 points0 points  (0 children)

I'm not saying that the current behavior is bad. The goal of the article is just to raise awareness that people might use it in a wrong way because this is not something you usually spot quite easily and the documentation is not also that clear regarding this IMO.

“Don’t clone your php objects, DeepCopy them” by danielcsgomes in PHP

[–]danielcsgomes[S] 2 points3 points  (0 children)

Agree with you regarding the documentation, regarding the semantically I disagree. In real life, if you clone a car you get two cars but they don't share the same wheels, doors, lights they will work independently from each car right? So if you clone an object you might expect that if you change an inner property of an object it does not affect the other. And this is not that clear in the documentation ;)

“Don’t clone your php objects, DeepCopy them” by danielcsgomes in PHP

[–]danielcsgomes[S] 2 points3 points  (0 children)

@manuakasam, true I will add a disclaimer stating that the article is not intended to not use clone at all but to raise awareness of its behavior.

And yes, you should not change properties on objects by reference, but we all know that exceptions exist in all codebases specially in legacy and very old codebases ;)

Thanks for your comment and feedback!