strpbrk

Supported Versions: PHP 5, PHP 7, PHP 8
Search a string for any of a set of characters
strpbrk(string $stringstring $characters): string|false
            $ip6 substr($hostName1$index 1);

            
$hostName substr($hostName$index 1);



            if (
strpbrk($hostName'[]') !== false || substr_count($hostName':') > 1) {

                return 
$error;

            }

        }
        $argument strtr($argument"\n"' ');



        
$quote strpbrk($argument" \t") !== false;

        
$argument Preg::replace('/(\\\\*)"/''$1$1\\"'$argument, -1$dquotes);

        
$meta $dquotes || Preg::isMatch('/%[^%]+%|![^!]+!/'$argument);
        $meta $dquotes || Preg::isMatch('/%[^%]+%|![^!]+!/'$argument);



        if (!
$meta && !$quote) {

            
$quote strpbrk($argument'^&|<>()') !== false;

        }



        if (
$quote) {
        if (Platform::isWindows()) {

            
$cmd Preg::replaceCallback("/('[^']*')/", function ($m) {


                
$char = (strpbrk($m[1], " \t^&|<>()") !== false || $m[1] === "''") ? '"' '';



                return 
str_replace("'"$char$m[1]);

            }, 
$cmd);