3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = '<ul><li><a href="">Test</a>(10)</li>'; $string = str_replace('</a>',' ', $string); // output <ul><li><a href="">Test'(10)</li> $string = str_replace('</li>','</a></li>', $string); echo($string); ?>
based on RF7B0
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc6
<ul><li><a href="">Test (10)</a></li>