3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = <<<XML <DataArea> <VehicleInventory> <Invoice> <Vehicle> <ModelYear>2010</ModelYear> <Make>Toyota</Make> <ModelDescription>Corolla</ModelDescription> <TrimCode>CE C PACKAGE</TrimCode> <SaleClass>Used</SaleClass> <VehicleNote language="eng"><![CDATA[Call us toll-free at 1 877 697-7889]]></VehicleNote> <VehicleNote language="fre"><![CDATA[VÉHICULES CERTIFIÉS TOYOTA, 3 ANS DE CHANGEMENT D'HUILE GRATUIT, , AUTOMATIQUE, CLIMATISEUR, RÉGULATEUR DE VITESSE, VITRES, MIROIR ET SERRURES ÉLECTRIQUES AINSI QUE TÉLÉDÉVEROUILLAGE À DISTANCE ET LECTEUR CD ET BEAUCOUP PLUS FINANCEMENT FACILE SUR PLACE SUR TOUT MODÈLE SÉLECTIONNÉ, INSPECTION EN 127 POINTS. VOTRE CONCESSIONNAIRE DE CONFIANCE À LACHINE-MONTRÉAL, SITUÉ À 10 MINUTES DU CENTRE-VILLE. LA FAMILLE SPINELLI PASSIONNÉE D'AUTOMOBILE DEPUIS 1922. Appelez-nous sans frais au 1 877 697-7889]]></VehicleNote> <VIN>2T1BU4EE1AC221946</VIN> <DeliveryMileage uom="K">63563</DeliveryMileage> <Mileage uom="K">63563</Mileage> <VehicleStock>U2361</VehicleStock> <DoorsQuantity>4</DoorsQuantity> <BodyStyle>Sedan</BodyStyle> <InteriorColor language="eng">Beige</InteriorColor> <InteriorColor language="fre">Beige</InteriorColor> <ExteriorColor language="eng">Beige</ExteriorColor> <ExteriorColor language="fre">Beige</ExteriorColor> <TransmissionType>automatic</TransmissionType> <TransmissionSpeeds>4</TransmissionSpeeds> <Drivetrain>front wheel drive</Drivetrain> <VehiclePricing> <VehiclePrice currency="CAD">13995</VehiclePrice> <VehiclePricingType>list</VehiclePricingType> </VehiclePricing> <VehiclePricing> <VehiclePrice currency="CAD">13400</VehiclePrice> <VehiclePricingType>internet</VehiclePricingType> </VehiclePricing> <Option> <OptionName>Fully Equipped</OptionName> </Option> <Option> <OptionName>AM/FM Radio</OptionName> </Option> <Option> <OptionName>CD Player</OptionName> </Option> <Option> <OptionName>Power Windows</OptionName> </Option> <Option> <OptionName>Power Doors</OptionName> </Option> <Option> <OptionName>Power Steering</OptionName> </Option> <Option> <OptionName>Air Conditioning</OptionName> </Option> <Option> <OptionName>Cruise Control</OptionName> </Option> <Option> <OptionName>Electric Mirrors</OptionName> </Option> <Option> <OptionName>ABS Brakes</OptionName> </Option> <Option> <OptionName>Kill Switch</OptionName> </Option> <Option> <OptionName>Tilt Steering</OptionName> </Option> <Option> <OptionName>Air Bags</OptionName> </Option> <Option> <OptionName>Wheel Covers</OptionName> </Option> <Option> <OptionName>Driver Airbag</OptionName> </Option> <Option> <OptionName>Passenger Airbag</OptionName> </Option> <Option> <OptionName>Side Airbags</OptionName> </Option> <Option> <OptionName>Rear-Folding Seats</OptionName> </Option> <Option> <OptionName>Adjustable Mirrors from Interior</OptionName> </Option> <Option> <OptionName>Clock</OptionName> </Option> <Option> <OptionName>Intermittent Wipers</OptionName> </Option> <Option> <OptionName>Interior Trunk Release</OptionName> </Option> <Option> <OptionName>Interior Fuel Latch</OptionName> </Option> <Option> <OptionName>Color Matched Bumpers</OptionName> </Option> <Option> <OptionName>Remote Entry</OptionName> </Option> <Option> <OptionName>Tachometer</OptionName> </Option> <Option> <OptionName>Onboard Computer</OptionName> </Option> <Option> <OptionName>Split Rear Seats</OptionName> </Option> <Option> <OptionName>Power Brakes</OptionName> </Option> <Option> <OptionName>Traction Control</OptionName> </Option> <Option> <OptionName>Heated mirrors</OptionName> </Option> <Option> <OptionName>Child proof locks</OptionName> </Option> <Option> <OptionName>Stability control</OptionName> </Option> <Option> <OptionName>Rainsensing wipers</OptionName> </Option> <Option> <OptionName>Rear window defroster</OptionName> </Option> <Option> <OptionName>MP3 player</OptionName> </Option> <Option> <OptionName>Floor mats</OptionName> </Option> <Option> <OptionName>Anchor Points for Child Seats</OptionName> </Option> <Option> <OptionName>Tire Pressure Monitoring System</OptionName> </Option> <Option> <OptionName>Curtain Airbags</OptionName> </Option> <DeliveryDate>2009-06-29T00:00:00-0400</DeliveryDate> <OrganizationalOwner> <PartyId>514SPINELLITOYOTA2</PartyId> <Name>Spinelli Toyota Lachine</Name> <Address qualifier="postal"> <AddressLine>561, boul. Saint-Joseph</AddressLine> <City>Lachine</City> <StateOrProvince>Québec</StateOrProvince> <Country>Canada</Country> <PostalCode>H8S 2K9</PostalCode> </Address> </OrganizationalOwner> <Remarketing> <EntryDate>2013-05-16T12:22:31-0400</EntryDate> <LastModDate>2013-06-12T15:35:12-0400</LastModDate> <Warranty> <WarrantyDescription type="legal" language="eng" region="QC">Class B : 3 months or 5,000 km.</WarrantyDescription> <WarrantyDescription type="legal" language="fre" region="QC">Classe B : 3 mois ou 5,000 km.</WarrantyDescription> <Manufacturer type="base"> <ExpiryDate>2014-06-29</ExpiryDate> <Mileage uom="K">100000</Mileage> </Manufacturer> <Supplementary language="fre">BALANCE DE GARANTIE MOTOPROPULSEUR SANS FRAIS QUI PREND FIN LE 29 JUIN 2014 OU 100.000 km ET ASSISTACE ROUTIERE GRATUIT POUR 12 MOIS, 3 ANS DE CHANGEMENT D'HUILE INCLUS GRATUIT, FINANCEMENT FACILE SUR TOUT NOS MODÈLE SÉLECTIONNER, 1 ÈRE, 2 IÈME CHANCE AU CRÉDIT---! TRÈS BON TAUX DISPONIBLE, FIXE ET VARIABLE VENEZ NOUS VOIR POUR PLUS D'INFO</Supplementary> </Warranty> <History> <PreviousOwnerType>personal</PreviousOwnerType> <PreviousUse language="fre">Voiture de promenade</PreviousUse> <PreviousUse language="eng">Passenger car</PreviousUse> </History> </Remarketing> <SourceUniqueID>5092588</SourceUniqueID> <Engine> <Fuel>Unleaded</Fuel> <Cylinders>4</Cylinders> <Induction>Normally aspirated</Induction> </Engine> <Photo order="1"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_2.jpg</Filename> </Photo> <Photo order="2"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_3.jpg</Filename> </Photo> <Photo order="3"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_4.jpg</Filename> </Photo> <Photo order="4"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_5.jpg</Filename> </Photo> <Photo order="5"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_6.jpg</Filename> </Photo> <Photo order="6"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_7.jpg</Filename> </Photo> <Photo order="7"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_8.jpg</Filename> </Photo> <Photo order="8"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_9.jpg</Filename> </Photo> <Photo order="9"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_10.jpg</Filename> </Photo> <Photo order="10"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_11.jpg</Filename> </Photo> <Photo order="11"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_12.jpg</Filename> </Photo> <Photo order="12"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_13.jpg</Filename> </Photo> <Photo order="13"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_14.jpg</Filename> </Photo> <Photo order="14"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_15.jpg</Filename> </Photo> <Photo order="15"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_16.jpg</Filename> </Photo> <Photo order="16"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_17.jpg</Filename> </Photo> <Photo order="17"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_18.jpg</Filename> </Photo> <Photo order="18"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_19.jpg</Filename> </Photo> <Photo order="19"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_20.jpg</Filename> </Photo> <Photo order="20"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_21.jpg</Filename> </Photo> <Photo order="21"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_22.jpg</Filename> </Photo> <Photo order="22"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_23.jpg</Filename> </Photo> <Photo order="23"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_24.jpg</Filename> </Photo> <Photo order="24"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_25.jpg</Filename> </Photo> <Photo order="25"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_26.jpg</Filename> </Photo> <Category>Passenger</Category> <Passengers>5</Passengers> </Vehicle> </Invoice> </VehicleInventory> </DataOption> XML; $xml = simplexml_load_string($x); $photos = $xml->DataOption->VehicleInventory->Invoice->Vehicle->xpath("//Photo"); foreach ($photos as $photo) echo "order: $photo[order], file: $photo->Filename<br />";
Output for 7.0.0 - 7.1.0
Warning: simplexml_load_string(): Entity: line 273: parser error : Opening and ending tag mismatch: DataArea line 1 and DataOption in /in/LosQE on line 279 Warning: simplexml_load_string(): </DataOption> in /in/LosQE on line 279 Warning: simplexml_load_string(): ^ in /in/LosQE on line 279 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Fatal error: Uncaught Error: Call to a member function xpath() on null in /in/LosQE:281 Stack trace: #0 {main} thrown in /in/LosQE on line 281
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Warning: simplexml_load_string(): Entity: line 273: parser error : Opening and ending tag mismatch: DataArea line 1 and DataOption in /in/LosQE on line 279 Warning: simplexml_load_string(): </DataOption> in /in/LosQE on line 279 Warning: simplexml_load_string(): ^ in /in/LosQE on line 279 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Fatal error: Call to a member function xpath() on null in /in/LosQE on line 281
Process exited with code 255.
Output for 5.1.0 - 5.1.1, 5.1.3 - 5.5.36
Warning: simplexml_load_string(): Entity: line 273: parser error : Opening and ending tag mismatch: DataArea line 1 and DataOption in /in/LosQE on line 279 Warning: simplexml_load_string(): </DataOption> in /in/LosQE on line 279 Warning: simplexml_load_string(): ^ in /in/LosQE on line 279 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Fatal error: Call to a member function xpath() on a non-object in /in/LosQE on line 281
Process exited with code 255.
Output for 5.1.2
Warning: simplexml_load_string(): Entity: line 273: parser error : Opening and ending tag mismatch: DataArea line 1 and DataOption in /in/LosQE on line 280 Warning: simplexml_load_string(): </DataOption> in /in/LosQE on line 280 Warning: simplexml_load_string(): ^ in /in/LosQE on line 280 Notice: Trying to get property of non-object in /in/LosQE on line 282 Notice: Trying to get property of non-object in /in/LosQE on line 282 Notice: Trying to get property of non-object in /in/LosQE on line 282 Notice: Trying to get property of non-object in /in/LosQE on line 282 Fatal error: Call to a member function xpath() on a non-object in /in/LosQE on line 282
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: Entity: line 273: parser error : Opening and ending tag mismatch: DataArea line 1 and DataOption in /in/LosQE on line 279 Warning: </DataOption> in /in/LosQE on line 279 Warning: ^ in /in/LosQE on line 279 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Notice: Trying to get property of non-object in /in/LosQE on line 281 Fatal error: Call to a member function xpath() on a non-object in /in/LosQE on line 281
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/LosQE on line 279
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/LosQE on line 279
Process exited with code 255.
Output for 4.4.2
Fatal error: Call to undefined function: simplexml_load_string() in /in/LosQE on line 280
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/LosQE on line 279