-
17 МАЙ 20160
-
16 МАЙ 20160
-
13 МАЙ 20160
cachearium - продвинутая система кэширования на PHP
Пример$data = 'xxxx'; // store $cache = CacheAbstract::factory('your backend'); $cache->store($data, new CacheKey('Namespace', 'Subname')); // get it later try { $data2 = $cache->get(new CacheKey('Namespace', 'Subname')); // $data2 == 'xxxx'; } catch (NotCachedException($e)) { // handle not cached } // store new value with automatic invalidation $data = 'yyy'; $cache->store($data, new CacheKey('Namespace', 'Subname'));
https://github.com/Corollarium/cachearium -
11 МАЙ 20160
-
22 АПР 20160
-
21 АПР 20160
-
20 АПР 20160
-
01 АПР 20160
Pawl - асинхронный вебсокет клиент на PHP
Пример - соединяется с сервером, отправляет сообщение, выводит, закрывает соединение<?php require __DIR__ . '/vendor/autoload.php'; \Ratchet\Client\connect('ws://echo.socketo.me:9000')->then(function($conn) { $conn->on('message', function($msg) use ($conn) { echo "Received: {$msg}\n"; $conn->close(); }); $conn->send('Hello World!'); }, function ($e) { echo "Could not connect: {$e->getMessage()}\n"; });
Категории:
Оставить на заметку в:





