How relevant a PhD that takes >8 years would be, specially in STEM fields? I am thinking of starting a PhD in CS while holding a full time job. If someone has a full-time job and starts a part-time PhD, it's reasonable to expect the PhD to take more than 8 years to be completed. I am wondering how relevant such a PhD would be, considering how fast some areas of CS are advancing.

For example my area of interest (and where I have practical experience) is computer vision and statistical learning. If I had started a PhD thesis, let's say in 2010, then by 2019 my thesis topic would most likely be redundant, considering all the advancement in computer vision and machine learning in the past decade.

I guess I am trying to get more insight from the more experienced people.
You don't wait with publishing till you finished your PhD, especially in such a fast moving field. So by the end of your education you will have made a contribution, even if at the time your PhD is finished your contribution is already less relevant. This is fine. A PhD is supposed to show that you can do independent research; think of it as vocational training for researchers. So if you show that you made contributions that at the time were good, then you have shown what you needed to show. Nobody expects of PhD students to be able to see the future.