This signature is depreciated in PHP 7.4 and removed in 8.0. I don't know how long the glue first signature has been around, but I'm pretty sure a long long time, so it should be safe to just move to that signature without worrying about breaking on older versions.
The following line uses implode but with the glue after the array, instead of before.
https://github.com/stefanscholz/moodle-format_kickstart/blob/master/classes/output/course_template_list.php#L130
This signature is depreciated in PHP 7.4 and removed in 8.0. I don't know how long the glue first signature has been around, but I'm pretty sure a long long time, so it should be safe to just move to that signature without worrying about breaking on older versions.