src/Wsl.php
/** Gets a value indicating whether the process is running inside Windows Subsystem for Linux. */
Gets a value indicating whether the process is running inside Windows Subsystem for Linux.
Gets a value indicating whether the process is running inside Windows Subsystem for Linux .
static function isWsl(): bool {
		if (PHP_OS_FAMILY != "Linux") return false;
		if (mb_stripos(php_uname(), "microsoft")) return true;
		$procFile = new \SplFileObject("/proc/version");
		return (bool) mb_stripos((string) $procFile->fread((int) $procFile->getSize()), "microsoft");
	}
static function isWsl ( ) : bool { if ( PHP_OS_FAMILY != " Linux " ) return false ; if ( mb_stripos ( php_uname ( ) , " microsoft " ) ) return true ; $ procFile = new \ SplFileObject ( " /proc/version " ) ; return ( bool ) mb_stripos ( ( string ) $ procFile -> fread ( ( int ) $ procFile -> getSize ( ) ) , " microsoft " ) ; }
Gets a value indicating whether the process is running inside Windows Subsystem for Linux.
Gets a value indicating whether the process is running inside Windows Subsystem for Linux .