run on mac
cnjack opened this issue · 1 comments
cnjack commented
mac os version: 10.13.5
php -v
PHP 7.1.16 (cli) (built: Apr 1 2018 13:14:42) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
php -m | grep nsq
nsq
but when I run the example
<?php
$nsq = new Nsq();
$isTrue = $nsq->connectNsqd(["127.0.0.1:4150"]);
for($i = 0; $i < 10000; $i++){
$nsq->publish("payment", json_encode(['amount' => (int)100, 'order_number' => 'xxx', 'status' => 'ok']));
}
$nsq->closeNsqdConnection();
?>
php -S 0.0.0.0:8888 -r .
PHP 7.1.16 Development Server started at Mon Jun 18 22:16:01 2018
Listening on http://0.0.0.0:8888
Document root is /Users/mac/workpath/phpnsq_demo
Press Ctrl-C to quit.
[1] 23653 illegal hardware instruction php -S 0.0.0.0:8888 -r .
yunnian commented
Try the latest code of master