| Conditions | 6 |
| Paths | 4 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | protected function stripBom($body) |
||
| 45 | { |
||
| 46 | if ( substr($body,0,3) === "\xef\xbb\xbf" ) // UTF-8 |
||
| 47 | $body = substr($body,3); |
||
| 48 | else if ( substr($body,0,4) === "\xff\xfe\x00\x00" || substr($body,0,4) === "\x00\x00\xfe\xff" ) // UTF-32 |
||
| 49 | $body = substr($body,4); |
||
| 50 | else if ( substr($body,0,2) === "\xff\xfe" || substr($body,0,2) === "\xfe\xff" ) // UTF-16 |
||
| 51 | $body = substr($body,2); |
||
| 52 | return $body; |
||
| 53 | } |
||
| 54 | } |