3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = 'azer <a href="aze">qsdf</a> 12456'; $result = preg_replace("/<\\/?a(\\s+.*?>|>)/", "", $string); echo "string = $string <br/>"; echo "result = $result <br/>";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string = azer <a href="aze">qsdf</a> 12456 <br/>result = azer qsdf 12456 <br/>