3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new DOMDocument(); $xs = '<?xml version="1.0" ?><root><foo /></root>'; $d->loadXML($xs); $x = new DOMXPath($d); // simple eval var_dump($x->evaluate('false()')); // complex but valid eval var_dump($x->evaluate('count(//foo)=0')); // bad eval var_dump($x->evaluate(')')); print_r(error_get_last());
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) bool(false) Warning: DOMXPath::evaluate(): Invalid expression in /in/fgMTl on line 15 Warning: DOMXPath::evaluate(): Invalid expression in /in/fgMTl on line 15 bool(false) Array ( [type] => 2 [message] => DOMXPath::evaluate(): Invalid expression [file] => /in/fgMTl [line] => 15 )

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:
46.7 ms | 402 KiB | 8 Q