PHP Classes

File: vendor/react/event-loop/examples/01-timers.php

Recommend this page to a friend!
  Classes of Hillary Kollan   Chatto PHP Websocket Chat System   vendor/react/event-loop/examples/01-timers.php   Download  
File: vendor/react/event-loop/examples/01-timers.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Chatto PHP Websocket Chat System
Websocket based chat system using Ratchet library
Author: By
Last change:
Date: 3 years ago
Size: 239 bytes
 

Contents

Class file image Download
<?php

require __DIR__ . '/../vendor/autoload.php';

$loop = React\EventLoop\Factory::create();

$loop->addTimer(0.8, function () {
    echo
'world!' . PHP_EOL;
});

$loop->addTimer(0.3, function () {
    echo
'hello ';
});

$loop->run();