# php56-chardet

## Description:

PHP 5.6용 libchardet C binding extension

## Features:

```php
<?php
if ( ! extension_loaded ('chardet') ) {
    fprintf (STDERR, "%s API isn't init\n", 'chardet');
    exit;
}

$strings = array (
    '안녕하세요 abc는 영어고요, 가나다는 한글 입니다.',
    '안녕',
    '안녕하세요',
    '조금더 길게 적어 봅니다. 어느 정도가 필요할까요? 오호라.. 점점 길어지네',
);

$fp = chardet_open ();

for ( $i=0; $i<count($strings); $i++ ) {
    $moz = chardet_detect ($fp, $strings[$i]);
    print_r ($moz);
}

chardet_close ($fp);
?>
```

## Reference:

* <http://svn.oops.org/wsvn/PHP.mod_chardet/trunk/README>
* <http://svn.oops.org/wsvn/PHP.mod_chardet/trunk/Reference>
* <http://svn.oops.org/wsvn/PHP.mod_chardet/trunk/sample-oop.php>
* <http://svn.oops.org/wsvn/PHP.mod_chardet/trunk/sample.php>

## Dependencies:

* [php56](/annyung-3-user-guide/annyung3-package-catalog/annyung3-addon-packages/pkg-addon-php56.md)
* [libchardet](/annyung-3-user-guide/annyung3-package-catalog/annyung3-core-packages/pkg-core-libchardet.md)

## Sub Packages:

* None

## Releated Packages:

* [python-chardet](/annyung-3-user-guide/annyung3-package-catalog/annyung3-core-packages/pkg-core-python-chardet.md)
* [php-chardet](/annyung-3-user-guide/annyung3-package-catalog/annyung3-core-packages/pkg-core-php-chardet.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://joungkyun.gitbook.io/annyung-3-user-guide/annyung3-package-catalog/annyung3-core-packages/pkg-core-php56-chardet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
