How can the code snippet provided be optimized for better performance in PHP?

The code snippet can be optimized for better performance in PHP by using a more efficient way to check if a string contains a specific substring. One way to do this is by using the `strpos()` function instead of `preg_match()` as it is faster and more suitable for simple substring checks.

// Original code snippet
if (preg_match('/word/', $string)) {
    // do something
}

// Optimized code snippet
if (strpos($string, 'word') !== false) {
    // do something
}