3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locator = 'and position()=1]'; libxml_use_internal_errors(true); libxml_suppress_errors(true); $document = new \DOMDocument('1.0', 'UTF-8'); $xpath = new \DOMXPath($document); var_dump( $xpath->evaluate($locator, $document) );

preferences:
57.39 ms | 402 KiB | 5 Q