From 0d488da6b03f31457dd6e321d0377471d2970f50 Mon Sep 17 00:00:00 2001 From: Igor Kroitor Date: Thu, 21 Dec 2017 09:45:09 +0300 Subject: [PATCH] added examples/php/react-eventloop-with-rate-limiting.php --- .../react-eventloop-with-rate-limiting.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 examples/php/react-eventloop-with-rate-limiting.php diff --git a/examples/php/react-eventloop-with-rate-limiting.php b/examples/php/react-eventloop-with-rate-limiting.php new file mode 100644 index 000000000000..45460581fddb --- /dev/null +++ b/examples/php/react-eventloop-with-rate-limiting.php @@ -0,0 +1,29 @@ +fetch_order_book ($symbol); + echo "----------------------------------------------------------------\n"; + echo date ('c') . "\n"; + echo count ($order_book['bids']) . " bids and " . count ($order_book['asks']) . " asks\n"; + echo sprintf ("bid: %.8f ask: %.8f", $order_book['bids'][0][0], $order_book['asks'][0][0]) . "\n"; + + $loop->futureTick ($tick_function); +}; + +$loop->futureTick ($tick_function); +$loop->run (); \ No newline at end of file