Consider this method:
function xyz() {
return $this->data = unserialize($this->serial); }
A few assumptions:
- Resultant data large enough to warrant discussion of efficiency
- I always want to store the unserialized data into the object
- The return value is only needed sometimes
If I only need to grab the return value on occassion, what is the
overhead of returning the value, if it's discarded most of the time?
Example:
$obj->xyz(); // method returns data, but nothing is done with it
Same difference?
Or better to break this out and only use return when needed?
Appreciate any expert responses. I don't know enough about the internals
of PHP to know the implications of this... thank you!
--Kelly
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php