3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'qwe <img src="http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg" /> sdfj <img src="http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg" style="width: 200px;" /> gbfkljho <img src=\'http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg\' /> sdfj <img src=\'http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg\' style=\'width: 200px;\' /> gbfkljho <img src=http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg /> sdfj <img style="width: 200px;" src=http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg /> gbfkljho'; $oldImage = [ 'path' => 'inlabu', 'id' => 47, 'url' => 'sfsjho.jpg', ]; $text = preg_replace('|<img(?!.*width)(.+)http://img7\.arrivo\.ru/'.$oldImage['path'].'/'.$oldImage['id'].'/\d/'.str_replace('.', '\.', urlencode($oldImage['url'])).'(?!.*width)(.*)>|U', '<img\\1\\2http://google.com\\3\\4>', $text); var_dump($text);
Output for git.master, git.master_jit, rfc.property-hooks
string(461) "qwe <img src="http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg" /> sdfj <img src="http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg" style="width: 200px;" /> gbfkljho <img src='http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg' /> sdfj <img src='http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg' style='width: 200px;' /> gbfkljho <img src=http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg /> sdfj <img style="width: 200px;" src=http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg /> gbfkljho"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.53 ms | 402 KiB | 8 Q