3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "The time is 1020 and the time is 1340 and 1550"; echo preg_replace('~\b\d{2}\K(?=\d{2}\b)~', ':', $data);

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
41.4 ms | 1621 KiB | 4 Q