<commit_before># React

Nuclear Reactor written in PHP.

[![Build Status](https://secure.travis-ci.org/react-php/react.png)](http://travis-ci.org/react-php/react)

## Install

The recommended way to install react is [through composer](http://getcomposer.org).

```JSON
{
    "require": {
        "react/react": "dev-master"
    }
}
```

## Usage

### Events

Both `React\Socket\Server` and `React\Socket\Connection` extend
[événement](https://github.com/igorw/evenement), allowing you to bind to
events.

### Example

Here is an example of a simple HTTP server listening on port 8000:
```php
<?php

$loop = new React\EventLoop\StreamSelectLoop();<commit_msg>Explain the library design goals in the README<commit_after># React

Event-driven, non-blocking I/O with PHP.

[![Build Status](https://secure.travis-ci.org/react-php/react.png)](http://travis-ci.org/react-php/react)

## Install

The recommended way to install react is [through composer](http://getcomposer.org).

```JSON
{
    "require": {
        "react/react": "dev-master"
    }
}
```

## Design goals

* Usable with a bare minimum of PHP extensions, add more extensions to get better performance.
* Provide a standalone event-loop component that can be re-used by other libraries.
* Decouple parts so they can be replaced by alternate implementations.

React is non-blocking by default. Use workers for blocking I/O.

## Usage

### Events

Both `React\Socket\Server` and `React\Socket\Connection` extend
[événement](https://github.com/igorw/evenement), allowing you to bind to
events.

### Example

Here is an example of a simple HTTP server listening on port 8000:
```php
<?php

$loop = new React\EventLoop\StreamSelectLoop();
{'fraction_non_alphanumeric': 0.1342400946185689, 'fraction_numerical': 0.004730928444707274, 'mean_word_length': 4.127272727272727, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '2026926', 'n_tokens_mistral': 543, 'n_tokens_neox': 526, 'n_words': 167}