I have a reference to some string. I need to copy (clone) that string.
This is what I tried
$newString = $refToString; //this just copies the ref - no new memory allocated $newString = clone $refToString; //this creates "__clone method called on non-object" error
If anyone knows how to do this, please help!