1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
namespace WPForms\Helpers;
/** * Class File. * * @since 1.6.5 */ class File {
/** * Remove UTF-8 BOM signature if it presents. * * @since 1.6.5 * * @param string $string String to process. * * @return string */ public static function remove_utf8_bom( $string ) {
if ( strpos( bin2hex( $string ), 'efbbbf' ) === 0 ) { $string = substr( $string, 3 ); }
return $string; } }
|