29/09
2017
dev-master
9999999-dev
MIT
The Requires
- php ^5.6
The Development Requires
Wallogit.com
2017 © Pedro PelĂĄez
Chainable native functions and more, (*1)
$domain = explode('@', 'andre.r.flip@gmail.com');
$domain = end($domain);
$domain = trim($domain);
$domain = with('andre.r.flip@gmail.com')->explode('@', '$$')->end()->trim()->get();
// 'gmail.com'
or, (*2)
$key = with('some.service.3rdparty.integration')
->explode('.', '!!')
->array_map(function ($value) {
return $value == '3rdparty' ? 'local' : $value;
}, '!!')
->implode('.', '!!')
->get();
// 'some.service.local.integration'
Inspired by Sebastiaan Luca Pipe item, (*3)
MIT