pecl-ev

Using PHP ev class (EvTimer)

半世苍凉 提交于 2020-05-09 10:57:31
问题 Im trying to use EvTimer class, part of PHP ev class. I have already installed ev using pecl on my linux machine and it is visible in phpinfo() . I would like to run this sample: // Create and start timer firing after 2 seconds $w1 = new EvTimer(2, 0, function () { echo "2 seconds elapsed\n"; }); Ev::run(); But even though i have ev extension installed and enabled, i receive not found error: PHP Fatal error: Class 'EvTimer' not found in /bin/test.php on line 4 Anyone know why it doesnt see