3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(0); $doc = new DOMDocument; $doc->preserveWhiteSpace = false; $url = "http://www.vosteen-shop.de/p-261232-edelstahl-herz-acero-zum-hngen-lnge-10cm-breite-10cm-silber-glanz.aspx"; $query = '//div[@class="sku"]'; // $query = 'substring-after(//div[@class="shop_item_caption"], "H")'; // $query = 'substring-before(normalize-space(//div[@class="sku"]),"VPE")'; $query = 'substring-before(//div[@class="sku"],"V")'; $query = "substring-before(//div[@class='sku'],'\xC2\xA0\xC2\xA0\r\n')"; $doc->loadHTMLFile($url); $xpath = new DOMXPath($doc); $entries = $xpath->evaluate($query); var_dump(is_object($entries)); echo ($entries);
based on ZnnKL
Output for 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(false)
Output for 4.3.2 - 5.0.5

Process exited with code 255.
Output for 4.3.0 - 4.3.1