Timeline for Do objects maintain identity under all non-cloning conditions in PHP?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 2, 2014 at 4:24 | vote | accept | Buttle Butkus | ||
Jun 30, 2014 at 1:01 | answer | added | y o | timeline score: 1 | |
Jun 23, 2014 at 8:27 | comment | added | GordonM | @RPM That hasn't been true since PHP 5.0.0. Class instances are always passed by reference (with some caveats, php.net//manual/en/language.oop5.references.php) | |
Jun 8, 2014 at 18:15 | history | edited | Buttle Butkus | CC BY-SA 3.0 |
added some detail about my understanding of PHP objects and the clone operator
|
Jun 8, 2014 at 18:12 | comment | added | Buttle Butkus |
Are you sure about that? I just found this stackoverflow question whose chosen answer states that you do not need to use & with objects. I suppose that fairly soon I will find out for myself once my code is wired and I start testing it. SO: stackoverflow.com/questions/2715026/…
|
|
Jun 8, 2014 at 7:22 | history | tweeted | twitter.com/#!/StackProgrammer/status/475538263261081600 | ||
Jun 8, 2014 at 3:51 | comment | added | Ryan |
PHP doesn't have pointers, use need to pass by reference &$object to not pass the object by value. Passing a copy and manipulating it will have effect in the scope of the method.
|
|
Jun 8, 2014 at 2:57 | history | asked | Buttle Butkus | CC BY-SA 3.0 |