3v4l.org

run code in 300+ PHP versions simultaneously
<?php $writer = new SimpleXMLElement('<?xml version="1.0"?><dsr:SalesReportToSocietyMessage xmlns:dsr="http://ddex.net/xml/2010/dsr-main/32" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MessageSchemaVersionId="2010/dsr-main/32" xsi:schemaLocation="http://ddex.net/xml/2010/dsr-main/32 http://ddex.net/xml/2010/dsr-main/32/dsr-main.xsd"><MessageHeader><MessageThreadId>0000000024</MessageThreadId><MessageId>000000002401</MessageId><MessageSender><PartyId>PADPIDA2010071901R</PartyId><PartyName><FullName>RHAPSODY INTERNATIONAL, INC.</FullName></PartyName><TradingName>Premier Extra</TradingName></MessageSender><MessageRecipient><PartyId>SWAPFORSOCIETYID</PartyId><PartyName><FullName>SWAPFORSOCIETYNAME</FullName></PartyName></MessageRecipient><MessageCreatedDateTime>2014-06-30T14:14:29</MessageCreatedDateTime></MessageHeader><MessageNotificationPeriod><StartDate>2013-01-01</StartDate><EndDate>2013-03-31</EndDate></MessageNotificationPeriod><ContainedResourceList><SoundRecording><SoundRecordingId><ISRC>GBAYE0501671</ISRC><ProprietaryId Namespace="DspResourceID">10116839</ProprietaryId></SoundRecordingId><IndirectSoundRecordingId><ISWC></ISWC></IndirectSoundRecordingId><ResourceReference>A00000001</ResourceReference><ReferenceTitle><TitleText>Put Your Records On (Radio Single)</TitleText></ReferenceTitle><Duration>PT0H03M33S</Duration><SoundRecordingDetailsByTerritory><TerritoryCode>Worldwide</TerritoryCode><Title><TitleText>Put Your Records On (Radio Single)</TitleText></Title><DisplayArtist><PartyName><FullName>Corinne Bailey Rae</FullName></PartyName><ArtistRole>FeaturedArtist</ArtistRole></DisplayArtist><IndirectResourceContributor><PartyName><FullName></FullName></PartyName><IndirectResourceContributorRole>Composer</IndirectResourceContributorRole></IndirectResourceContributor></SoundRecordingDetailsByTerritory></SoundRecording></ContainedResourceList><ContainedReleaseList><Release><ReleaseId><ProprietaryId Namespace="DspReleaseID">10116839</ProprietaryId></ReleaseId><ReferenceTitle><TitleText>Put Your Records On (Radio Single)</TitleText></ReferenceTitle><ReleaseResourceReferenceList><ReleaseResourceReference>A00000001</ReleaseResourceReference></ReleaseResourceReferenceList><ReleaseType>TrackRelease</ReleaseType><ReleaseDetailsByTerritory><TerritoryCode>Worldwide</TerritoryCode><DisplayArtist><PartyName><FullName>Corinne Bailey Rae</FullName></PartyName></DisplayArtist></ReleaseDetailsByTerritory></Release><Release><ReleaseId><ProprietaryId Namespace="DspReleaseID">10121948</ProprietaryId></ReleaseId><ReferenceTitle><TitleText>Under The Bridge</TitleText></ReferenceTitle><ReleaseResourceReferenceList><ReleaseResourceReference>A00000002</ReleaseResourceReference></ReleaseResourceReferenceList><ReleaseType>TrackRelease</ReleaseType><ReleaseDetailsByTerritory><TerritoryCode>Worldwide</TerritoryCode><DisplayArtist><PartyName><FullName>Red Hot Chili Peppers</FullName></PartyName></DisplayArtist></ReleaseDetailsByTerritory></Release></ContainedReleaseList><SalesReport><DSP><PartyName><FullName>RHAPSODY INTERNATIONAL, INC.</FullName></PartyName><PartyId>PADPIDA2010071901R</PartyId></DSP><Licensor><PartyName><FullName>SWAPFORSOCIETYNAME</FullName></PartyName><PartyId>SWAPFORSOCIETYID</PartyId></Licensor><SalesByCommercialModel><CommercialModelType>SubscriptionModel</CommercialModelType><CurrencyOfAccounting>SWAPFORCURRENCY</CurrencyOfAccounting><SalesByTerritory><TerritoryCode>PT</TerritoryCode><ReleaseTransactions><ReleaseId><ProprietaryId Namespace="DspReleaseID">10116839</ProprietaryId></ReleaseId><SalesTransaction><UseType>OnDemandStream</UseType><DistributionChannelType>InternetAndMobile</DistributionChannelType><SalesData><NumberOfConsumerSalesGross>1</NumberOfConsumerSalesGross><NumberOfFreeUnitsToConsumers>0</NumberOfFreeUnitsToConsumers><PriceConsumerPaidExcSalesTax>000000000.00</PriceConsumerPaidExcSalesTax></SalesData></SalesTransaction></ReleaseTransactions><ReleaseTransactions><ReleaseId><ProprietaryId Namespace="DspReleaseID">10121948</ProprietaryId></ReleaseId><SalesTransaction><UseType>OnDemandStream</UseType><DistributionChannelType>InternetAndMobile</DistributionChannelType><SalesData><NumberOfConsumerSalesGross>1</NumberOfConsumerSalesGross><NumberOfFreeUnitsToConsumers>0</NumberOfFreeUnitsToConsumers><PriceConsumerPaidExcSalesTax>000000000.00</PriceConsumerPaidExcSalesTax></SalesData></SalesTransaction></ReleaseTransactions><ReleaseTransactions><ReleaseId><ProprietaryId Namespace="DspReleaseID">101925613</ProprietaryId></ReleaseId><SalesTransaction><UseType>OnDemandStream</UseType><DistributionChannelType>InternetAndMobile</DistributionChannelType><SalesData><NumberOfConsumerSalesGross>1</NumberOfConsumerSalesGross><NumberOfFreeUnitsToConsumers>0</NumberOfFreeUnitsToConsumers><PriceConsumerPaidExcSalesTax>000000000.00</PriceConsumerPaidExcSalesTax></SalesData></SalesTransaction></ReleaseTransactions><ReleaseTransactions><ReleaseId><ProprietaryId Namespace="DspReleaseID">10269415</ProprietaryId></ReleaseId><SalesTransaction><UseType>OnDemandStream</UseType><DistributionChannelType>InternetAndMobile</DistributionChannelType><SalesData><NumberOfConsumerSalesGross>2</NumberOfConsumerSalesGross><NumberOfFreeUnitsToConsumers>0</NumberOfFreeUnitsToConsumers><PriceConsumerPaidExcSalesTax>000000000.00</PriceConsumerPaidExcSalesTax></SalesData></SalesTransaction></ReleaseTransactions><ReleaseTransactions><ReleaseId><ProprietaryId Namespace="DspReleaseID">10269417</ProprietaryId></ReleaseId><SalesTransaction><UseType>OnDemandStream</UseType><DistributionChannelType>InternetAndMobile</DistributionChannelType><SalesData><NumberOfConsumerSalesGross>3</NumberOfConsumerSalesGross><NumberOfFreeUnitsToConsumers>0</NumberOfFreeUnitsToConsumers><PriceConsumerPaidExcSalesTax>000000000.00</PriceConsumerPaidExcSalesTax></SalesData></SalesTransaction></ReleaseTransactions><NumberOfSubscribers><Quantity>SWAPFORSOCIETYSUBSCRIBERCOUNT</Quantity><UseType>OnDemandStream</UseType></NumberOfSubscribers><DspNetRevenue><Amount>SWAPFORSOCIETYAMOUNT</Amount><UseType>OnDemandStream</UseType></DspNetRevenue></SalesByTerritory></SalesByCommercialModel></SalesReport><NumberOfSalesTransactionRecords>3448</NumberOfSalesTransactionRecords></dsr:SalesReportToSocietyMessage>'); $numberofsubscribers = $writer->xpath('//SalesReport/SalesByCommercialModel/SalesByTerritory/DspNetRevenue'); $numberofsubscribers[0]->Quantity = '169.10'; var_dump($numberofsubscribers); //$output = $writer->asXML(); //echo $output; ?>

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.60.0090.00617.25
8.3.50.0090.01222.31
8.3.40.0120.00319.22
8.3.30.0040.01119.46
8.3.20.0080.00020.52
8.3.10.0090.00023.98
8.3.00.0080.00021.32
8.2.180.0100.00617.00
8.2.170.0120.00922.96
8.2.160.0100.00720.89
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00020.02
8.2.110.0000.00921.00
8.2.100.0080.00418.28
8.2.90.0040.00419.67
8.2.80.0040.00418.25
8.2.70.0030.00618.00
8.2.60.0040.00418.43
8.2.50.0040.00418.13
8.2.40.0040.00420.38
8.2.30.0020.00518.63
8.2.20.0000.00818.13
8.2.10.0050.00318.44
8.2.00.0050.00318.05
8.1.280.0090.00625.92
8.1.270.0130.00324.41
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00622.61
8.1.230.0060.00617.95
8.1.220.0040.00418.16
8.1.210.0070.00318.77
8.1.200.0090.00017.72
8.1.190.0000.00817.73
8.1.180.0040.00418.10
8.1.170.0080.00418.75
8.1.160.0040.00422.39
8.1.150.0000.00818.96
8.1.140.0000.00817.84
8.1.130.0000.00718.27
8.1.120.0000.00717.90
8.1.110.0070.00017.91
8.1.100.0080.00017.71
8.1.90.0040.00417.80
8.1.80.0000.01117.81
8.1.70.0000.00717.86
8.1.60.0000.00817.98
8.1.50.0000.00817.83
8.1.40.0040.00417.91
8.1.30.0030.00618.04
8.1.20.0000.00818.00
8.1.10.0030.00617.75
8.1.00.0040.00417.92
8.0.300.0000.00818.77
8.0.290.0040.00417.13
8.0.280.0000.00718.85
8.0.270.0030.00617.68
8.0.260.0000.00717.70
8.0.250.0080.00017.38
8.0.240.0000.00717.42
8.0.230.0030.00317.37
8.0.220.0000.00817.15
8.0.210.0000.00817.34
8.0.200.0000.00617.37
8.0.190.0000.00717.41
8.0.180.0040.00417.41
8.0.170.0040.00417.12
8.0.160.0040.00417.09
8.0.150.0000.00817.08
8.0.140.0080.00017.20
8.0.130.0030.00313.78
8.0.120.0000.00817.18
8.0.110.0040.00417.34
8.0.100.0070.00017.22
8.0.90.0020.00517.28
8.0.80.0060.00917.29
8.0.70.0000.00817.23
8.0.60.0000.00817.41
8.0.50.0000.00917.13
8.0.30.0100.01017.31
8.0.20.0060.01217.42
8.0.10.0040.00417.37
8.0.00.0080.01617.04
7.4.330.0070.00015.45
7.4.320.0030.00317.05
7.4.300.0030.00316.95
7.4.290.0070.00016.81
7.4.280.0030.00616.92
7.4.270.0000.00717.03
7.4.260.0000.00717.05
7.4.250.0000.00716.74
7.4.240.0020.00517.01
7.4.230.0030.00317.08
7.4.220.0120.00616.90
7.4.210.0040.01316.99
7.4.200.0020.00517.09
7.4.190.0040.00416.77
7.4.160.0150.00016.77
7.4.150.0060.01217.40
7.4.140.0100.00917.86
7.4.130.0140.01216.83
7.4.120.0100.00716.91
7.4.110.0130.00716.85
7.4.100.0120.00916.76
7.4.90.0060.01216.85
7.4.80.0070.01119.39
7.4.70.0100.01016.89
7.4.60.0070.01016.74
7.4.50.0060.00316.92
7.4.40.0060.00917.00
7.4.30.0080.01116.99
7.4.00.0100.00715.10
7.3.330.0000.00613.62
7.3.320.0030.00313.43
7.3.310.0050.00316.81
7.3.300.0000.00816.61
7.3.290.0090.00916.71
7.3.280.0070.01016.69
7.3.270.0140.01117.40
7.3.260.0090.00916.62
7.3.250.0110.01117.02
7.3.240.0130.00416.82
7.3.230.0110.00716.71
7.3.210.0130.00616.78
7.3.200.0150.00319.39
7.3.190.0110.01117.11
7.3.180.0160.00316.70
7.3.170.0100.00716.86
7.3.160.0080.00816.74
7.3.120.0100.00715.27
7.2.330.0090.00917.12
7.2.320.0110.00816.96
7.2.310.0110.00617.09
7.2.300.0030.01316.67
7.2.290.0110.00717.12
7.1.100.0060.00618.01
7.1.70.0040.00417.31
7.1.60.0190.00619.46
7.1.50.0040.01817.00
7.1.00.0030.07722.55
7.0.200.0040.00416.69
7.0.140.0000.07322.25
7.0.110.0570.07320.19
7.0.100.0600.05020.13
7.0.90.0530.06320.26
7.0.80.0700.04320.24
7.0.70.0570.07720.11
7.0.60.0530.05320.06
7.0.50.0570.07020.03
7.0.40.0030.04320.00
7.0.30.0070.05320.08
7.0.20.0070.03719.91
7.0.10.0030.07019.88
7.0.00.0030.08320.00
5.6.280.0070.07021.20
5.6.260.0130.03320.85
5.6.250.0100.06321.10
5.6.240.0100.07020.86
5.6.230.0100.03720.85
5.6.220.0100.07320.77
5.6.210.0030.08020.77
5.6.200.0030.08720.85
5.6.190.0130.06320.83
5.6.180.0100.08020.87
5.6.170.0070.03320.98
5.6.160.0000.04320.87
5.6.150.0100.06720.86
5.6.140.0100.09720.81
5.6.130.0070.08020.85
5.6.120.0070.04720.83
5.6.110.0030.05721.06
5.6.100.0070.07720.76
5.6.90.0030.04020.81
5.6.80.0100.03020.19
5.6.70.0070.03720.13
5.6.60.0030.04720.45
5.6.50.0000.04320.25
5.6.40.0000.03320.23
5.6.30.0000.04320.20
5.6.20.0030.04020.13
5.6.10.0070.03720.16
5.6.00.0070.03320.15
5.5.380.0030.06017.86
5.5.370.0030.05317.91
5.5.360.0130.04017.82
5.5.350.0000.06017.99
5.5.340.0070.04718.39
5.5.330.0000.05718.05
5.5.320.0100.03317.95
5.5.310.0100.07718.27
5.5.300.0030.08718.30
5.5.290.0030.08717.95
5.5.280.0030.07317.95
5.5.270.0000.08318.42
5.5.260.0000.04318.42
5.5.250.0070.03718.02
5.5.240.0030.03717.43
5.5.230.0000.04017.68
5.5.220.0000.04317.58
5.5.210.0000.04017.79
5.5.200.0000.03317.40
5.5.190.0030.03717.57
5.5.180.0000.04717.57
5.5.160.0000.03317.69
5.5.150.0000.03317.69
5.5.140.0070.03317.44
5.5.130.0000.03317.39
5.5.120.0000.03317.61
5.5.110.0100.03017.43
5.5.100.0000.03317.56
5.5.90.0000.04317.65
5.5.80.0000.03317.63
5.5.70.0030.03017.41
5.5.60.0070.03717.41
5.5.50.0030.03317.65
5.5.40.0000.03317.32
5.5.30.0030.04317.30
5.5.20.0030.03317.54
5.5.10.0000.03317.57
5.5.00.0100.02717.19
5.4.450.0100.06319.75
5.4.440.0170.07019.77
5.4.430.0030.06719.59
5.4.420.0100.06319.81
5.4.410.0030.04319.62
5.4.400.0070.03319.43
5.4.390.0070.03319.32
5.4.380.0000.04019.16
5.4.370.0000.03319.30
5.4.360.0000.03319.22
5.4.350.0070.03319.19
5.4.340.0030.03019.13
5.4.320.0070.02719.27
5.4.310.0000.03319.41
5.4.300.0030.03719.30
5.4.290.0000.03319.34
5.4.280.0100.03319.25
5.4.270.0030.03019.41
5.4.260.0030.04019.17
5.4.250.0130.02019.18
5.4.240.0070.02719.29
5.4.230.0100.02319.41
5.4.220.0070.04319.18
5.4.210.0000.04319.25
5.4.200.0030.03319.20
5.4.190.0070.03019.48
5.4.180.0070.02719.24
5.4.170.0000.03319.41
5.4.160.0030.03019.40
5.4.150.0030.03319.18
5.4.140.0100.02316.91
5.4.130.0000.03316.49
5.4.120.0070.02716.43
5.4.110.0030.03016.61
5.4.100.0030.04016.79
5.4.90.0030.03016.80
5.4.80.0030.03316.46
5.4.70.0000.03316.46
5.4.60.0000.03716.35
5.4.50.0070.05716.75
5.4.40.0070.03716.58
5.4.30.0030.05016.77
5.4.20.0000.07716.60
5.4.10.0100.06316.59
5.4.00.0030.03316.17
5.3.290.0030.03014.83
5.3.280.0130.02714.73
5.3.270.0000.03314.81
5.3.260.0000.03314.75
5.3.250.0000.03714.79
5.3.240.0030.03014.77
5.3.230.0000.03314.77
5.3.220.0070.02714.71
5.3.210.0030.03014.70
5.3.200.0100.02714.82
5.3.190.0070.03314.75
5.3.180.0030.03014.77
5.3.170.0030.07014.72
5.3.160.0030.06014.64
5.3.150.0070.07014.82
5.3.140.0070.08014.65
5.3.130.0170.04014.82
5.3.120.0030.03714.70
5.3.110.0030.08014.84
5.3.100.0030.03314.17
5.3.90.0130.06714.19
5.3.80.0030.03714.13
5.3.70.0030.07014.13
5.3.60.0030.06314.29
5.3.50.0030.07014.20
5.3.40.0070.07014.20
5.3.30.0070.06314.07
5.3.20.0030.07013.98
5.3.10.0030.03313.86
5.3.00.0070.07713.77
5.2.170.0200.05011.98
5.2.160.0070.06011.98
5.2.150.0030.02711.98
5.2.140.0070.03311.98
5.2.130.0100.05311.98
5.2.120.0000.03011.98
5.2.110.0030.02711.98
5.2.100.0000.03011.98
5.2.90.0030.05011.98
5.2.80.0000.04711.98
5.2.70.0070.02311.98
5.2.60.0070.04711.98
5.2.50.0000.03711.98
5.2.40.0000.06711.98
5.2.30.0000.06311.98
5.2.20.0030.05311.98
5.2.10.0030.06311.98
5.2.00.0000.05011.98
5.1.60.0130.04311.98
5.1.50.0000.03711.98
5.1.40.0070.02311.98
5.1.30.0030.03711.98
5.1.20.0100.05311.98
5.1.10.0000.03011.98
5.1.00.0030.03311.98
5.0.50.0070.02711.98
5.0.40.0100.03711.98
5.0.30.0000.05011.98
5.0.20.0000.03311.98
5.0.10.0000.02011.98
5.0.00.0030.06311.98
4.4.90.0000.01711.98
4.4.80.0000.03011.98
4.4.70.0030.02011.98
4.4.60.0000.03311.98
4.4.50.0000.01311.98
4.4.40.0000.02711.98
4.4.30.0000.02011.98
4.4.20.0000.02311.98
4.4.10.0000.03011.98
4.4.00.0030.05011.98
4.3.110.0070.03311.98
4.3.100.0000.03311.98
4.3.90.0000.02011.98
4.3.80.0030.05311.98
4.3.70.0000.03311.98
4.3.60.0030.03011.98
4.3.50.0000.03711.98
4.3.40.0000.05011.98
4.3.30.0070.01711.98
4.3.20.0000.02011.98
4.3.10.0000.03311.98
4.3.00.0030.02311.98

preferences:
48.42 ms | 401 KiB | 5 Q