Is there a way in PHP to verify an object was passed by reference and a copy of it was not made? In C++ you could use the addressof operator and check the memory address of the variable your about to pass to the method, and then once in the method call it again on the local method argument and check the two addresses to see if there the same.
anyone know how to do something like that in PHP??
Verify an object was passed by reference.
Moderator: General Moderators
reflection I believe... http://fr3.php.net/manual/en/language.o ... ection.php
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
function someFoo(&$someVar)
{
}