3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstring = <<<XML <?xml version="1.0" encoding="UTF-8"?> <Request> <Login> <UserName>admin</UserName> <Password>admin</Password> </Login> <Set Operation="get"> <WebFilterCategory transactionid=""> <Name>Categoryname1</Name> <Classification>Objectionable</Classification> <DomainList> <Domain>example1.com</Domain> <Domain>example2.com</Domain> </DomainList> </WebFilterCategory> <WebFilterCategory transactionid=""> <Name>Categoryname2</Name> <Classification>Objectionable</Classification> <DomainList> <Domain>example1.org</Domain> <Domain>example2.org</Domain> </DomainList> </WebFilterCategory> </Set> </Request> XML; $xml = simplexml_load_string( $xmlstring ) or die("Error: Cannot create object"); foreach ($xml->xpath('//WebFilterCategory[Name[contains(., "Categoryname2")]]') as $category) { print_r($category); }
Output for git.master, git.master_jit, rfc.property-hooks
SimpleXMLElement Object ( [@attributes] => Array ( [transactionid] => ) [Name] => Categoryname2 [Classification] => Objectionable [DomainList] => SimpleXMLElement Object ( [Domain] => Array ( [0] => example1.org [1] => example2.org ) ) )

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:
181.14 ms | 406 KiB | 5 Q