3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<OperatingProfile> <RegularDayType> <DaysOfWeek> <Tuesday /> <Wednesday /> <Thursday /> <Friday /> </DaysOfWeek> </RegularDayType> <SpecialDaysOperation> <DaysOfNonOperation> <DateRange> <StartDate>2015-12-24</StartDate> <EndDate>2016-01-01</EndDate> </DateRange> </DaysOfNonOperation> </SpecialDaysOperation> <BankHolidayOperation> <DaysOfNonOperation> <AllBankHolidays /> </DaysOfNonOperation> </BankHolidayOperation> </OperatingProfile>'; $simpleXML = simplexml_load_string($xml); $stuff = $simpleXML->{'BankHolidayOperation'}->{'DaysOfNonOperation'}->xpath('/*'); print_r($stuff);
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.5 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Array ( [0] => SimpleXMLElement Object ( [RegularDayType] => SimpleXMLElement Object ( [DaysOfWeek] => SimpleXMLElement Object ( [Tuesday] => SimpleXMLElement Object ( ) [Wednesday] => SimpleXMLElement Object ( ) [Thursday] => SimpleXMLElement Object ( ) [Friday] => SimpleXMLElement Object ( ) ) ) [SpecialDaysOperation] => SimpleXMLElement Object ( [DaysOfNonOperation] => SimpleXMLElement Object ( [DateRange] => SimpleXMLElement Object ( [StartDate] => 2015-12-24 [EndDate] => 2016-01-01 ) ) ) [BankHolidayOperation] => SimpleXMLElement Object ( [DaysOfNonOperation] => SimpleXMLElement Object ( [AllBankHolidays] => SimpleXMLElement Object ( ) ) ) ) )

preferences:
169.47 ms | 408 KiB | 183 Q