3v4l.org

run code in 300+ PHP versions simultaneously
<?php $soapResponse = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <OTA_AirLowFareSearchRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="6.1.0" PricedItinCount="23" BrandedOneWayItinCount="0" SimpleOneWayItinCount="0" DepartedItinCount="0" SoldOutItinCount="0" AvailableItinCount="0"> <Success/> <Warnings> <Warning Type="SERVER" Code="GCA14-ISELL-TN-00-2023-02-00-N560" MessageClass="I" ShortText="27036"/> <Warning Type="WORKERTHREAD" Code="TRANSACTIONID" MessageClass="I" ShortText="2171192456387197437"/> <Warning Type="DRE" Code="RULEID" MessageClass="I" ShortText="23102"/> <Warning Type="DEFAULT" Code="RULEID" MessageClass="I" ShortText="23121"/> </Warnings> <PricedItineraries> <PricedItinerary SequenceNumber="1"> <AirItinerary DirectionInd="OneWay"> <OriginDestinationOptions> <OriginDestinationOption ElapsedTime="750" DepartureCountry="AE" ArrivalCountry="PK"> <FlightSegment DepartureDateTime="2023-03-28T22:30:00" ArrivalDateTime="2023-03-28T23:30:00" StopQuantity="0" FlightNumber="553" ResBookDesigCode="V" ElapsedTime="120"> <DepartureAirport LocationCode="DXB" TerminalID="1"/> <ArrivalAirport LocationCode="RUH" TerminalID="4"/> <OperatingAirline Code="SV" FlightNumber="553"/> <Equipment AirEquipType="789"/> <MarketingAirline Code="SV"/> <MarriageGrp>O</MarriageGrp> <DepartureTimeZone GMTOffset="4"/> <ArrivalTimeZone GMTOffset="3"/> <TPA_Extensions> <eTicket Ind="true"/> <Mileage Amount="543"/> </TPA_Extensions> </FlightSegment> <FlightSegment DepartureDateTime="2023-03-29T06:40:00" ArrivalDateTime="2023-03-29T12:00:00" StopQuantity="0" FlightNumber="708" ResBookDesigCode="V" ElapsedTime="200"> <DepartureAirport LocationCode="RUH" TerminalID="4"/> <ArrivalAirport LocationCode="KHI" TerminalID="M"/> <OperatingAirline Code="SV" FlightNumber="708"/> <Equipment AirEquipType="330"/> <MarketingAirline Code="SV"/> <MarriageGrp>I</MarriageGrp> <DepartureTimeZone GMTOffset="3"/> <ArrivalTimeZone GMTOffset="5"/> <TPA_Extensions> <eTicket Ind="true"/> <Mileage Amount="1282"/> </TPA_Extensions> </FlightSegment> </OriginDestinationOption> </OriginDestinationOptions> </AirItinerary> <AirItineraryPricingInfo PricingSource="ADVJR1" PricingSubSource="HPIS" FareReturned="true" LastTicketDate="2023-03-28" LastTicketTime="22:30"> <ItinTotalFare> <BaseFare Amount="280" CurrencyCode="AED" DecimalPlaces="0"/> <FareConstruction Amount="74.87" CurrencyCode="NUC" DecimalPlaces="2"/> <EquivFare Amount="19790" CurrencyCode="PKR" DecimalPlaces="0"/> <Taxes> <Tax TaxCode="TOTALTAX" Amount="15168" CurrencyCode="PKR" DecimalPlaces="0"/> </Taxes> <TotalFare Amount="34958" CurrencyCode="PKR" DecimalPlaces="0"/> </ItinTotalFare> <PTC_FareBreakdowns> <PTC_FareBreakdown> <PassengerTypeQuantity Code="ADT" Quantity="1"/> <FareBasisCodes> <FareBasisCode BookingCode="V" DepartureAirportCode="DXB" ArrivalAirportCode="RUH" FareComponentBeginAirport="DXB" FareComponentEndAirport="KHI" FareComponentDirectionality="FROM" FareComponentVendorCode="ATP" FareComponentFareTypeBitmap="00" FareComponentFareType="ER" FareComponentFareTariff="33" FareComponentFareRule="2000" GovCarrier="SV">VOWAE</FareBasisCode> <FareBasisCode BookingCode="V" AvailabilityBreak="true" DepartureAirportCode="RUH" ArrivalAirportCode="KHI" GovCarrier="SV">VOWAE</FareBasisCode> </FareBasisCodes> <PassengerFare> <BaseFare Amount="280" CurrencyCode="AED"/> <FareConstruction Amount="74.87" CurrencyCode="NUC" DecimalPlaces="2"/> <EquivFare Amount="19790" CurrencyCode="PKR" DecimalPlaces="0"/> <Taxes> <Tax TaxCode="AE4" Amount="5301" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="AE"/> <Tax TaxCode="F62" Amount="2474" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="AE"/> <Tax TaxCode="TP" Amount="354" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="AE"/> <Tax TaxCode="ZR2" Amount="354" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="AE"/> <Tax TaxCode="E32" Amount="553" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="SA"/> <Tax TaxCode="E3" Amount="553" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="SA"/> <Tax TaxCode="IO" Amount="3812" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="SA"/> <Tax TaxCode="YRF" Amount="1767" CurrencyCode="PKR" DecimalPlaces="0"/> <TaxSummary TaxCode="AE" Amount="5301" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="AE"/> <TaxSummary TaxCode="F6" Amount="2474" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="AE"/> <TaxSummary TaxCode="TP" Amount="354" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="AE"/> <TaxSummary TaxCode="ZR" Amount="354" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="AE"/> <TaxSummary TaxCode="E3" Amount="1106" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="SA"/> <TaxSummary TaxCode="IO" Amount="3812" CurrencyCode="PKR" DecimalPlaces="0" CountryCode="SA"/> <TaxSummary TaxCode="YR" Amount="1767" CurrencyCode="PKR" DecimalPlaces="0"/> <TotalTax Amount="15168" CurrencyCode="PKR" DecimalPlaces="0"/> </Taxes> <TotalFare Amount="34958" CurrencyCode="PKR"/> <TPA_Extensions> <BaggageInformationList> <BaggageInformation ProvisionType="A" AirlineCode="SV"> <Segment Id="0"/> <Segment Id="1"/> <Allowance Pieces="1"/> </BaggageInformation> </BaggageInformationList> </TPA_Extensions> </PassengerFare> <Endorsements NonRefundableIndicator="false"/> <TPA_Extensions> <FareCalcLine Info="DXB SV X/RUH SV KHI74.87NUC74.87END ROE3.67275"/> </TPA_Extensions> <FareInfos> <FareInfo> <FareReference>V</FareReference> <TPA_Extensions> <SeatsRemaining Number="4" BelowMin="false"/> <Cabin Cabin="Y"/> <Meal Code="M"/> </TPA_Extensions> </FareInfo> <FareInfo> <FareReference>V</FareReference> <TPA_Extensions> <SeatsRemaining Number="4" BelowMin="false"/> <Cabin Cabin="Y"/> <Meal Code="M"/> </TPA_Extensions> </FareInfo> </FareInfos> </PTC_FareBreakdown> </PTC_FareBreakdowns> <FareInfos> <FareInfo> <FareReference>V</FareReference> <TPA_Extensions> <SeatsRemaining Number="4" BelowMin="false"/> <Cabin Cabin="Y"/> <Meal Code="M"/> </TPA_Extensions> </FareInfo> <FareInfo> <FareReference>V</FareReference> <TPA_Extensions> <SeatsRemaining Number="4" BelowMin="false"/> <Cabin Cabin="Y"/> <Meal Code="M"/> </TPA_Extensions> </FareInfo> </FareInfos> <TPA_Extensions> <DivideInParty Indicator="false"/> </TPA_Extensions> </AirItineraryPricingInfo> <TicketingInfo TicketType="eTicket" ValidInterline="Yes"/> <TPA_Extensions> <ValidatingCarrier Code="SV"/> <DiversitySwapper WeighedPriceAmount="78445.8"/> </TPA_Extensions> </PricedItinerary> </PricedItineraries> </OTA_AirLowFareSearchRS> </SOAP-ENV:Body> </SOAP-ENV:Envelope>'; // used namespaces, the keys do NOT need to match the prefixes in the XML. $xmlns = [ 'soap' => 'http://schemas.xmlsoap.org/soap/envelope/', 'eb' => 'http://www.ebxml.org/namespaces/messageHeader', 'sec' => 'http://schemas.xmlsoap.org/ws/2002/12/secext' ]; $document = new DOMDocument(); $document->loadXML($$soapResponse); $xpath = new DOMXpath($document); // register your aliases for the namespaces foreach ($xmlns as $alias => $uri) { $xpath->registerNamespace($alias, $uri); } $bodyExtract = $xpath->evaluate( 'string(//soap:Body)' ); var_dump($bodyExtract); ?>

Abusive script

This script was stopped while abusing our resources

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.110.0120.00820.94
8.3.100.0000.00824.06
8.3.90.0130.00326.77
8.3.80.0030.00617.97
8.3.70.0170.00718.43
8.3.60.0040.01118.56
8.3.50.0100.01016.98
8.3.40.0100.00321.98
8.3.30.0120.00318.74
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.230.0060.00322.58
8.2.220.0050.00537.54
8.2.210.0030.00626.77
8.2.200.0120.00016.88
8.2.190.0110.00716.75
8.2.180.0150.00616.75
8.2.170.0090.00619.09
8.2.160.0040.01122.96
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0000.00726.16
8.2.120.0040.00426.16
8.2.110.0100.00019.23
8.2.100.0040.00819.70
8.2.90.0050.00317.84
8.2.80.0050.00318.05
8.2.70.0080.00017.80
8.2.60.0070.00018.09
8.2.50.0080.00017.63
8.2.40.0060.00319.15
8.2.30.0120.00318.99
8.2.20.0080.00519.04
8.2.10.0130.00018.91
8.2.00.0060.00619.05
8.1.290.0040.00430.84
8.1.280.0090.00625.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0030.00619.07
8.1.230.0090.00322.63
8.1.220.0060.00317.79
8.1.210.0050.00318.91
8.1.200.0040.00417.35
8.1.190.0080.00617.23
8.1.180.0040.00418.10
8.1.170.0030.00518.77
8.1.160.0110.00518.84
8.1.150.0130.00418.68
8.1.140.0080.00818.74
8.1.130.0060.01118.68
8.1.120.0120.00518.86
8.1.110.0080.00818.86
8.1.100.0100.00718.77
8.1.90.0130.00318.73
8.1.80.0150.00418.66
8.1.70.0150.00018.80
8.1.60.0140.00018.75
8.1.50.0130.00418.72
8.1.40.0160.00418.93
8.1.30.0140.00718.81
8.1.20.0140.00518.88
8.1.10.0090.00918.77
8.1.00.0080.00818.63
8.0.300.0080.00019.77
8.0.290.0000.00916.88
8.0.280.0150.00017.96
8.0.270.0090.00618.05
8.0.260.0070.00718.12
8.0.250.0050.00918.02
8.0.240.0090.00517.99
8.0.230.0130.00318.04
8.0.220.0130.00318.20
8.0.210.0100.00518.17
8.0.200.0070.00718.16
8.0.190.0140.00018.27
8.0.180.0070.00718.05
8.0.170.0140.00018.27
8.0.160.0100.00518.21
8.0.150.0120.00318.21
8.0.140.0120.00418.14
8.0.130.0160.00017.95
8.0.120.0170.00018.12
8.0.110.0100.00317.95
8.0.100.0110.00517.98
8.0.90.0150.00018.08
8.0.80.0150.00018.02
8.0.70.0060.01118.12
8.0.60.0120.00418.15
8.0.50.0060.00918.04
8.0.30.0120.00317.96
8.0.20.0100.00518.05
8.0.10.0080.00818.33

preferences:
27.47 ms | 403 KiB | 5 Q