Laravel 8 preg_replace_array() {#collection-method}
preg_replace_array
函数使用正则表达式用给定的数组替换字符串中的内容后的结果:
$string = 'The event will take place between :start and :end';
$replaced = preg_replace_array('/:[a-z_]+/', ['8:30', '9:00'], $string);
// The event will take place between 8:30 and 9:00