in both cases, it is eventually assigned to $item.
No, nothing is being assigned to $item. Rather, in the error case, $item becomes an alias, i.e. an alternate way to access the same instance of the constant string "abcdef".
In reply to Re^2: Still don't undersand "Modification of a read-only value attempted" error
by Eliya
in thread Still don't undersand "Modification of a read-only value attempted" error
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |