Instead of going like this:

PHP Code:
  foreach(scandir($feed->model) as $result) {
  
            if(
preg_match('/.php$/'$result) && preg_match('/class/'$result)) {
                
                echo 
"YES";
                
            } else {
                
                echo 
"NO";
                
            }
            
        } 
Is it possible to put them together into one preg_match function?