1<?php 2use Swoole\Coroutine as co; 3 4co::create(function() { 5 $ip = co::gethostbyname("www.baidu.com"); 6 echo "IP: $ip\n"; 7}); 8