According to php manual:
// Note: // $a and $b are completely equal here. $a is not pointing to $b or vice versa. // $a and $b
PHP uses copy-on-write so it won't use more memory for the duplicated strings until you modify them.