Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
--TEST--
client curl user handler
--SKIPIF--
--FILE--
evbase = $evbase;
$this->client = $client;
}
function init($run) {
$this->run = $run;
}
function timer(int $timeout_ms) {
echo "T";
if (isset($this->timeout)) {
$this->timeout->add($timeout_ms/1000);
} else {
$this->timeout = Event::timer($this->evbase, function() {
if (!call_user_func($this->run, $this->client)) {
if ($this->timeout) {
$this->timeout->del();
$this->timeout = null;
}
}
});
$this->timeout->add($timeout_ms/1000);
}
}
function socket($socket, int $action) {
echo "S";
switch ($action) {
case self::POLL_NONE:
break;
case self::POLL_REMOVE:
if (isset($this->ios[(int) $socket])) {
echo "U";
$this->ios[(int) $socket]->del();
unset($this->ios[(int) $socket]);
}
break;
default:
$ev = 0;
if ($action & self::POLL_IN) {
$ev |= Event::READ;
}
if ($action & self::POLL_OUT) {
$ev |= Event::WRITE;
}
if (isset($this->ios[(int) $socket])) {
$this->ios[(int) $socket]->set($this->evbase,
$socket, $ev, $this->onEvent($socket));
} else {
$this->ios[(int) $socket] = new Event($this->evbase,
$socket, $ev, $this->onEvent($socket));
}
break;
}
}
function onEvent($socket) {
return function($watcher, $events) use($socket) {
$action = 0;
if ($events & Ev::READ) {
$action |= self::POLL_IN;
}
if ($events & Ev::WRITE) {
$action |= self::POLL_OUT;
}
if (!call_user_func($this->run, $this->client, $socket, $action)) {
if ($this->timeout) {
$this->timeout->del();
$this->timeout = null;
}
}
};
}
function once() {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
function wait(int $timeout_ms = null) {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
function send() {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
}
include "helper/server.inc";
server("proxy.inc", function($port) {
$evbase = new EventBase;
$client = new http\Client;
$client->configure([
"use_eventloop" => new UserHandler($client, $evbase)
]);
$client->enqueue(new http\Client\Request("GET", "http://localhost:$port/"), function($r) {
var_dump($r->getResponseCode());
});
$evbase->loop();
});
?>
===DONE===
--EXPECTREGEX--
Test
T*[ST]+U+T*int\(200\)
===DONE===