Created
February 20, 2015 21:47
-
-
Save m6w6/8847bc10ccdf93dcab17 to your computer and use it in GitHub Desktop.
Query pecl_http RFC votes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
(new http\Client)->enqueue( | |
new http\Client\Request("GET", "https://wiki.php.net/rfc/pecl_http"), | |
function($res) { | |
$xpath = new DomXpath(@DomDocument::loadHtml($res->getBody())); | |
$nodes = $xpath->query("//form[@id='doodle__form__add_pecl_http_to_the_core']/table/tbody/tr[last()]/th"); | |
printf("Choice: | %14s | %14s | %14s |\n", "Yes, enabled", "Yes, disabled", "No, no way!"); | |
vprintf("%s | %14d | %14d | %14d |\n", array_map(function($node) { | |
return $node->textContent; | |
}, iterator_to_array($nodes))); | |
} | |
)->send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment