3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-type: text/plain; charset=utf-8'); error_reporting(0); ////////////////////////////////////////// $urlParams = explode('/', $_SERVER['REQUEST_URI']); $word = $urlParams[2]; $url = "http://www.oxfordlearnersdictionaries.com/definition/english/comfortable"; ////////////////////////////////////////// $dom = new DOMDocument; $dom->loadHTMLFile($url); $xpath = new DOMXPath($dom); $qx = '//*[@class="pron-gs ei-g"]/span[@class="pron-g"]'; $nodes = $xpath->query($qx); /* Set HTTP response header to plain text for debugging output */ header("Content-type: text/plain"); /* Traverse the DOMNodeList object to output each DomNode's nodeValue */ foreach ($nodes as $i => $node) { echo "\n\n", "Node($i): ", $node->C14N(), "\n"; } //*[@id="ceremony__10"]/span[2] //*[@id="tab3"]/div/div[1]/strong/span //$rqx5 = '//div[@class="tudich"]/div[@class="candich"]'; // tieu de co han tu //$rqx5 = '//div[@class="tudich"]/div[@class="kqdich"]/div[@class="nddich"]/span'; // khong co han tu //$rqx5 = '//div[@class="tudich"]/div[@class="kqdich"]/div[@class="nddich"]/strong[1]'; // nghia //$result = array(); // foreach ($nodes as $i => $node) { // $child = $xpath->query($rqx5, $node)->item(0); // if (!empty($child)) { // echo PHP_EOL . $i ." = ". $child->nodeValue; // } // else { // echo PHP_EOL . $i ." = ". ":)"; // } // } ?>
Output for git.master, git.master_jit, rfc.property-hooks

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
61.4 ms | 401 KiB | 8 Q