Prefer:

```php
$resultingAtoms[count($resultingAtoms) - 1] = sprintf(
    '%s%s%s',
    $name,
    static::EXTENSION_SEPARATOR,
    implode(static::EXTENSION_SEPARATOR , $extensions)
);
```