Optimized php check

$extensions = array('ph','htm','txt','js','pl','cgi','py','bash','sh','xml','ssi');
$need_to_scan = (boolean) array_search($ext, $extensions);