When it comes to plastics, the saying goes: 4, 5, 1, 2, all the rest are bad for you.
However, #1 (PET) is not ideal since it’s often thin and intended for single use (think plastic water bottles) . Hence, it breaks down quicker and may pose a risk of leaching.
Consider re-using these for your gardens.
#4 - LDPE
#5 - PP
#2 - HDPE
PVC has been used as water pipe for decades, but recently has seen greater scrutiny about chemicals leaching out. PEX is becoming more common now, but that is not perfect either.