3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystack = "your string..."; $needle = "<b>quick brown</b>"; echo str_repeat($needle . "<br>", substr_count($haystack, $needle));

preferences:
47.92 ms | 402 KiB | 5 Q