3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lines ="From: {Name|1} {Email|11} Phone / Skype: {Phone / Skype|8} removeIfEmpty Message Body: {Tell us more|9} removeIfEmpty Sender's IP: {ip} {refUTM} -- This e-mail was sent from a contact form on Software Development Company - Redwerk (http://redwerk.com)"; $pattern = "/^.*\bremoveIfEmpty\b.*$/m"; $matches = array(); preg_match_all($pattern, $lines, $matches); foreach($matches as $match) { preg_replace("/removeIfEmpty/", $match, ""); var_dump(trim($match)); }

preferences:
68.73 ms | 402 KiB | 5 Q