first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?php
class WPML_Encoding_Validation {
const MIN_CHAR_SIZE = 26;
/**
* @param string $string
*
* @return int
*/
public function is_base64( $string ) {
return self::MIN_CHAR_SIZE < strlen( $string ) && preg_match_all( '#^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$#', $string, $matches );
}
}