3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div class="whatever col-md-5 etc">foo</div>'; $regex = '#col-md-5#'; $html = preg_replace($regex, 'col-md-12', $html); echo $html;

preferences:
65.76 ms | 402 KiB | 5 Q