3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting (E_ALL ^ E_NOTICE); ini_set('display_errors',true); $xml = <<<XML <?xml version="1.0" encoding="UTF-8"?> <Whirlpool xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <PricingInfoResults> <RequestResults> <RequestDate>1/5/2017</RequestDate> <RequestTime>8:35 AM</RequestTime> <ReturnInfo> <ReturnInfoCode>1000</ReturnInfoCode> <ReturnInfoDesc>Promo code found</ReturnInfoDesc> </ReturnInfo> </RequestResults> <PricingInfo> <ProductDesc>Icemaker</ProductDesc> <CampaignCode>WRLPIO1612</CampaignCode> <CMICode>WR1612WEB</CMICode> <MCMCode>WHIRLPOOLWBOX</MCMCode> <RowId>1309467.00</RowId> <Term> <TermDesc>1 Year</TermDesc> <PaymentOption> <OptionDesc>Full Pay</OptionDesc> <Price>94.95</Price> <ProductIndicator>WD</ProductIndicator> </PaymentOption> </Term> <Term> <TermDesc>3 Year</TermDesc> <PaymentOption> <OptionDesc>Full Pay</OptionDesc> <Price>244.95</Price> <ProductIndicator>WE</ProductIndicator> </PaymentOption> </Term> </PricingInfo> </PricingInfoResults> </Whirlpool> XML; $simpleXML = simplexml_load_string($xml); $xpathText = '/Term/TermDesc'; $parent = (string)$simpleXML->PricingInfoResults->PricingInfo->Term->xpath($xpathText)[0]; echo '<pre>Parent';$parent;echo '</pre>'; ;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 0 in /in/RKKbI on line 47 <pre>Parent</pre>

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