class Test
{
private $cache = [];
public function get($key, $fun)
{
if ( ! isset($this->cache[$key])) {
$this->cache[$key] = $fun();
}
return $this->cache[$key];
}
}
$('.radio-input').parent('p').html((i, text) => text.replace('Какой-то ', ''));