3v4l.org

run code in 300+ PHP versions simultaneously
<?php $embedCode = '<iframe width="800"> </iframe>'; echo preg_replace('/(<iframe[^>]*\swidth=")(\d+)("\s.*)/', '${1}' . $width . '{3}', $embedCode);

preferences:
39.37 ms | 402 KiB | 5 Q