<commit_before><?php
require_once dirname(__FILE__) . '/../vendor/SplClassLoader/SplClassLoader.php';

$loader = new SplClassLoader('Yuyat', dirname(__FILE__) . '/../src');
$loader->setNamespaceSeparator('_');
$loader->register();

$loader = new SplClassLoader('Edps', dirname(__FILE__) . '/../vendor/yuya-takeyama/edps/src');
$loader->setNamespaceSeparator('_');
$loader->register();

$urls = array(
    'http://twitter.com/',
    'http://www.facebook.com/',
    'http://www.yahoo.co.jp/',
    'http://www.google.co.jp/',
);

$loop   = new Yuyat_ParallelHttp_EventLoop;
$client = new Yuyat_ParallelHttp_Client($loop);

foreach ($urls as $url) {
    $request = $client->request($url, function ($response) {
        var_dump($response->getStatusCode());
        var_dump($response->getHeaders());
        var_dump($response->getBody());
        echo PHP_EOL;<commit_msg>Fix example<commit_after><?php
require_once dirname(__FILE__) . '/../vendor/SplClassLoader/SplClassLoader.php';

$loader = new SplClassLoader('Yuyat', dirname(__FILE__) . '/../src');
$loader->setNamespaceSeparator('_');
$loader->register();

$loader = new SplClassLoader('Edps', dirname(__FILE__) . '/../vendor/yuya-takeyama/edps/src');
$loader->setNamespaceSeparator('_');
$loader->register();

$urls = array(
    'http://twitter.com/',
    'http://www.facebook.com/',
    'http://www.yahoo.co.jp/',
    'http://www.google.co.jp/',
);

$loop   = new Yuyat_ParallelHttp_EventLoop;
$client = new Yuyat_ParallelHttp_Client($loop);

foreach ($urls as $url) {
    $request = $client->request($url, function ($response) {
        echo "Status Code: ";
        var_dump($response->getStatusCode());
        echo "Headers:", PHP_EOL;
        var_dump($response->getHeaders());
        echo "Body:", PHP_EOL;
        var_dump($response->getBody());
        echo PHP_EOL;
        echo PHP_EOL;
{'fraction_non_alphanumeric': 0.19913653534808418, 'fraction_numerical': 0.0, 'mean_word_length': 3.9572192513368982, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1601089', 'n_tokens_mistral': 624, 'n_tokens_neox': 622, 'n_words': 97}