3v4l.org

run code in 200+ 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 - 7.2.0
<div><div class="rev_slider_2_{$amount}"></div><i id="rev_slider_2_{$amount}"></i></div>