PHP Foreach Pass by Reference: Last Element Duplicating? (Bug?) [duplicate] PHP Foreach Pass by Reference: Last Element Duplicating? (Bug?) [duplicate] php php