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