3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "This is some text <p>##IDOBJECT=784##</p> and another some text <p>##IDOBJECT=1509##</p> <p>##LATESTARTICLESHOME=321##</p> <p align=\"center\">##IDOBJECT=321##</p>"; echo preg_replace_callback('/##(.*?)##/', function($match){ return strtolower('[object ' . $match[1] . ']'); }, $str);
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22, 8.5.0 - 8.5.7
This is some text <p>[object idobject=784]</p> and another some text <p>[object idobject=1509]</p> <p>[object latestarticleshome=321]</p> <p align="center">[object idobject=321]</p>

preferences:
99 ms | 1468 KiB | 4 Q