- substr: documentation ( source)
- stripos: documentation ( source)
<?php
function getIndex($name)
{
$algorithm = null;
if ($pos = stripos($name, '_USING_')) {
$algorithm = substr($name, $pos + 7);
}
return $algorithm;
}
echo getIndex('textsearch_index_USING_GIST');