for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace zqhong\route\Helpers;
class Str
{
/**
* Determine if a given string contains a given substring.
*
* @param string $haystack
* @param string|array $needles
* @return bool
*/
public static function contains($haystack, $needles)
foreach ((array)$needles as $needle) {
if ($needle != '' && mb_strpos($haystack, $needle) !== false) {
return true;
}
return false;