3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $amount = 5; $stuff = '<div><div class="rev_slider_2_2_wrapper"></div><i id="rev_slider_2_2_wrapper"></i></div>'; $stuff = preg_replace( '/rev_slider_(\d+)_(\d+)_wrapper/i', 'rev_slider_$1_{$amount}', $stuff ); print_r( $stuff );
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<div><div class="rev_slider_2_{$amount}"></div><i id="rev_slider_2_{$amount}"></i></div>