Skip to content

Instantly share code, notes, and snippets.

@bwoebi
bwoebi / example.php
Last active June 1, 2016 17:51 — forked from chrisleavoy/example.php
Amp\wait LogicException
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
function resolve($pluginName, $x)
{
$saneDefaults = [
'types' => \Amp\Dns\Record::A, 'server' => "8.8.8.{$x}", 'timeout' => 1000, 'tries' => 1,
'cache' => false
];
$result = (yield \Amp\Dns\resolve($pluginName, $saneDefaults));