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 - 7.1.0
<div><div class="rev_slider_2_5"></div><i id="rev_slider_2_5"></i></div>