3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '--ACT-- active --INA-- inactive'; $text = preg_replace("/--ACT-- (\w+)/" , '<div class="wp"><b>1</b>$1</div>',$text); Echo preg_replace("/--INA-- (\w+)/" , '<div class="wp"><b>2</b>$1</div>',$text);

preferences:
168.91 ms | 404 KiB | 5 Q