3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=<<<XML <?xml version="1.0"?> <root> <type name="test"> <class name="CustomerProfileLite" inList="true" > <enum name="Order" takeOtherValuesFromProperties="true"> <value>None</value> </enum> <property name="Guid" type="guid" /> <property name="CreationDate" type="datetime" isInEnum="true" /> <property name="LastUpdateDate" type="datetime" isIndexed="true" isInEnum="true" /> <property name="Revision" type="int" isIndexed="true" isInEnum="true" /> <property name="Thumbnail" type="string" convertToRelativePathInDB="true" /> <property name="UmsJob" type="string" isIndexed="true"/> <property name="FirstName" type="string" isIndexed="true" isInEnum="true" /> <property name="LastName" type="string" isIndexed="true" isInEnum="true" /> <property name="Address" type="string" isInEnum="true" /> <property name="City" type="string" isInEnum="true" /> <property name="PhoneNumber" type="string" isIndexed="true" isInEnum="true" /> <property name="CellPhoneNumber" type="string" isIndexed="true" isInEnum="true" /> <property name="Birthdate" type="OptionalDateTime" isInEnum="true" /> <property name="HasFrames" type="bool" /> <property name="LatestEquipementHasFarVisionBoxings" type="bool" /> <property name="LatestEquipementHasFarVisionImages" type="bool" /> <property name="LatestEquipementHasSplines" type="bool" /> <property name="LatestEquipementHasIpadMeasure" type="bool" /> <sattribute name="IsModified" type="bool" /> <sattribute name="LastModificationDate" type="datetime" /> </class> </type> </root> XML; $dom=simplexml_load_string($xml); foreach($dom->xpath("//class") as $class) { echo (string)$class["name"]; echo "\n"; foreach($class->property as $property) { echo (string)$property["name"]; echo "\t"; echo (string)$property["type"]; echo "\n"; } } foreach($dom->xpath("//enum") as $enum) { echo (string)$enum["name"]; echo "\t"; echo (string)$enum->value; }
Output for git.master, git.master_jit, rfc.property-hooks
CustomerProfileLite Guid guid CreationDate datetime LastUpdateDate datetime Revision int Thumbnail string UmsJob string FirstName string LastName string Address string City string PhoneNumber string CellPhoneNumber string Birthdate OptionalDateTime HasFrames bool LatestEquipementHasFarVisionBoxings bool LatestEquipementHasFarVisionImages bool LatestEquipementHasSplines bool LatestEquipementHasIpadMeasure bool Order None

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