IdnaEncoder::is_ascii( string $text )

Check whether a given text string contains only ASCII characters


Parameters

$text

(Required) Text to examine.


Return

(bool) Is the text string ASCII-only?


Source

File: wp-includes/Requests/src/IdnaEncoder.php

	protected static function is_ascii($text) {
		return (preg_match('/(?:[^\x00-\x7F])/', $text) !== 1);
	}