3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $variable = "asdfasdg <img src=\"foo.jpg\"> asdgfasdgasdg"; print preg_replace("~src=\"([^\"]+)\.(jpg|png|gif)\"~iu", "=src\"$1.$2?style=grid\"", $variable);
Output for 4.3.0 - 7.1.0
asdfasdg <img =src"foo.jpg?style=grid"> asdgfasdgasdg