3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $emails = array(); $emails[] = "josephmware@gmail.com"; $emails[] = "joseph.mware@gmail.com"; $emails[] = "joseph.m.ware@gmail.com"; $emails[] = "j.osephmware@gmail.com"; $emails[] = "j.o.s.e.p.h.m.ware@gmail.com"; $emails[] ="j.o.s.e.p.h.m.w.a.r.e@gmail.com"; $pattern = "/\./"; foreach($emails as $email) { preg_replace($pattern, "", $email); echo "$email" . "\n\r"; }
based on F5sRs
Output for 4.3.0 - 7.3.0rc4
josephmware@gmail.com joseph.mware@gmail.com joseph.m.ware@gmail.com j.osephmware@gmail.com j.o.s.e.p.h.m.ware@gmail.com j.o.s.e.p.h.m.w.a.r.e@gmail.com