Both vinyl and wrought iron are strong candidates as fencing materials when long-term durability is considered. Vinyl, however, will be less likely to discolor and stain as time wears on. Wrought iron will require annual repainting to ward off rust, and will likely develop rust spots regardless. Rust will take a long time to have any structural effect on your fence, however, and you might find the antique rust look aesthetically appealing.
Wrought iron is considerably heavier than vinyl. You will have to put more effort into giving an iron fence a firm footing. This will involve pouring cement for each post. Vinyl fences, on the other hand, can often be installed without using cement, or require considerably less cement for the job. This will make installing a vinyl fence much easier and far less costly than wrought iron installation.
Wrought iron comes in a variety of styles, but the choices are limited by the material. A solid, privacy-style wrought iron fence would not be cost effective. Most wrought iron fences consist of spaced bars with various decorations. If you are looking for a privacy fence, vinyl is the clear winner. Many styles of stockade and other solid fence pieces are manufactured in vinyl.
As vinyl fencing has gained in popularity its cost has come down considerably. Wrought iron remains a high-end fencing material, and will cost considerably more than vinyl if you decide to enclose your yard with it. With similar lifespans, vinyl fencing will give you many more years for your dollar than wrought iron will.