3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version="1.0" encoding="UTF-8"?> <root> <area> <photographer_id>1</photographer_id> <photographer>John</photographer> <image>a</image> </area> <area> <photographer_id>1</photographer_id> <photographer>John</photographer> <image>b</image> </area> <area> <photographer_id>1</photographer_id> <photographer>John</photographer> <image>c</image> </area> <area> <photographer_id>2</photographer_id> <photographer>Fred</photographer> <image>a</image> </area> </root> XML; $sxe = new SimpleXMLElement($xml); $searchKeyword = "Fred"; $area = $sxe->xpath("//area[contains(translate(photographer,$searchKeyword) )]"); print_r($area);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: SimpleXMLElement::xpath(): Invalid number of arguments in /in/juiKg on line 30 Warning: SimpleXMLElement::xpath(): xmlXPathEval: 3 object left on the stack in /in/juiKg on line 30

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:
51.26 ms | 401 KiB | 8 Q