You actually have to do it in two parts:

```php
$parts = explode('/', $options['name'], 2);
$childName = end($parts);

// if user/tweets it will return 'tweet'
// if user/tweets/retweets, it will return 'tweets/retweets'
// if user it will return user
```