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>'); $licensor = $writer->xpath('//SalesReport/Licensor'); $licensor[0]->PartyId = 'ARESA'; $licensor[0]->PartyName->FullName = '1234'; var_dump($licensor); //$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.40.0140.00019.03
8.3.30.0040.01119.55
8.3.20.0110.00720.54
8.3.10.0000.00823.77
8.3.00.0040.00421.39
8.2.170.0150.00022.96
8.2.160.0120.00620.88
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00021.42
8.2.110.0060.00322.77
8.2.100.0060.00618.34
8.2.90.0000.00819.76
8.2.80.0000.00818.13
8.2.70.0000.00917.88
8.2.60.0040.00418.28
8.2.50.0050.00318.07
8.2.40.0040.00420.46
8.2.30.0050.00318.70
8.2.20.0030.00518.09
8.2.10.0060.00318.41
8.2.00.0040.00418.04
8.1.270.0040.00424.46
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00624.36
8.1.230.0070.00419.59
8.1.220.0000.00818.03
8.1.210.0040.00418.77
8.1.200.0140.01017.75
8.1.190.0040.00417.73
8.1.180.0000.00818.10
8.1.170.0040.00419.03
8.1.160.0000.00822.37
8.1.150.0080.00018.96
8.1.140.0040.00417.78
8.1.130.0040.00418.32
8.1.120.0000.00817.73
8.1.110.0000.00817.80
8.1.100.0000.00817.66
8.1.90.0050.00317.88
8.1.80.0060.00317.68
8.1.70.0050.00317.73
8.1.60.0060.00318.04
8.1.50.0030.00617.88
8.1.40.0040.00417.95
8.1.30.0000.00817.94
8.1.20.0030.00518.01
8.1.10.0000.00817.98
8.1.00.0000.00817.89
8.0.300.0040.00418.77
8.0.290.0060.00317.54
8.0.280.0040.00418.82
8.0.270.0000.00717.56
8.0.260.0000.00917.64
8.0.250.0040.00417.31
8.0.240.0050.00317.26
8.0.230.0030.00317.42
8.0.220.0000.00717.20
8.0.210.0030.00317.08
8.0.200.0000.00617.41
8.0.190.0030.00617.26
8.0.180.0030.00517.37
8.0.170.0000.00817.34
8.0.160.0050.00217.22
8.0.150.0000.00717.29
8.0.140.0100.00017.06
8.0.130.0030.00313.75
8.0.120.0000.00817.19
8.0.110.0050.00317.32
8.0.100.0030.00517.37
8.0.90.0040.00417.06
8.0.80.0070.00817.22
8.0.70.0050.00217.35
8.0.60.0050.00217.36
8.0.50.0050.00217.20
8.0.30.0110.01117.51
8.0.20.0120.00717.55
8.0.10.0000.00717.30
8.0.00.0130.00617.30
7.4.330.0040.00315.00
7.4.320.0000.00716.85
7.4.300.0040.00416.92
7.4.290.0000.00716.96
7.4.280.0000.00716.99
7.4.270.0070.00016.82
7.4.260.0030.00317.03
7.4.250.0000.00716.79
7.4.240.0020.00616.96
7.4.230.0070.00016.95
7.4.220.0150.00317.04
7.4.210.0070.01016.79
7.4.200.0000.00716.69
7.4.190.0040.00416.73
7.4.160.0160.00016.83
7.4.150.0090.01817.40
7.4.140.0060.01217.86
7.4.130.0070.01116.84
7.4.120.0080.00916.97
7.4.110.0080.01116.81
7.4.100.0090.00916.77
7.4.90.0000.01816.74
7.4.80.0030.01319.39
7.4.70.0130.01016.65
7.4.60.0060.01216.75
7.4.50.0030.00616.93
7.4.40.0060.01516.93
7.4.30.0130.00317.07
7.4.00.0080.00015.05
7.3.330.0000.00713.41
7.3.320.0040.00413.30
7.3.310.0080.00016.79
7.3.300.0040.00416.75
7.3.290.0120.00916.59
7.3.280.0090.00716.74
7.3.270.0150.00417.40
7.3.260.0150.00316.90
7.3.250.0110.00916.91
7.3.240.0200.00016.91
7.3.230.0100.01516.91
7.3.210.0140.01016.73
7.3.200.0060.01219.39
7.3.190.0150.00616.61
7.3.180.0100.00716.75
7.3.170.0030.01316.72
7.3.160.0060.01116.76
7.3.120.0030.01014.97
7.2.330.0090.00916.69
7.2.320.0080.01116.77
7.2.310.0190.00617.16
7.2.300.0090.00917.08
7.2.290.0150.00416.83
7.2.60.0090.00617.32
7.1.200.0040.00715.90
7.1.100.0060.00618.08
7.1.70.0070.00017.36
7.1.60.0090.01519.46
7.1.50.0030.00917.34
7.1.00.0030.07722.72
7.0.200.0090.00016.92
7.0.140.0030.07322.28
7.0.60.0130.06320.19
7.0.50.0070.06718.04
7.0.40.0070.08720.19
7.0.30.0370.04320.42
7.0.20.0270.08320.39
7.0.10.0100.07020.50
7.0.00.0130.08020.49
5.6.280.0070.07021.37
5.6.210.0100.07720.86
5.6.200.0030.09018.45
5.6.190.0070.08720.97
5.6.180.0170.04020.66
5.6.170.0370.05320.67
5.6.160.0030.04320.77
5.6.150.0100.04318.35
5.6.140.0070.08318.37
5.6.130.0130.07318.43
5.6.120.0100.08021.16
5.6.110.0100.05721.29
5.6.100.0130.08021.29
5.6.90.0000.07021.30
5.6.80.0070.08020.66
5.5.350.0400.07020.57
5.5.340.0030.09018.25
5.5.330.0100.03720.72
5.5.320.0400.05720.67
5.5.310.0200.04720.64
5.5.300.0170.05718.25
5.5.290.0030.08718.25
5.5.280.0070.05320.98
5.5.270.0030.06721.09
5.5.260.0000.04320.96
5.5.250.0130.06720.88
5.5.240.0370.06320.36
5.4.450.0270.08019.73
5.4.440.0170.07719.73
5.4.430.0130.06319.43
5.4.420.0200.07319.75
5.4.410.0330.05319.32
5.4.400.0100.06019.30
5.4.390.0130.08319.10
5.4.380.0230.03719.49
5.4.370.0170.07019.11
5.4.360.0230.05319.34
5.4.350.0230.04719.34
5.4.340.0170.06719.38
5.4.320.0200.08019.49
5.4.310.0270.07019.38
5.4.300.0230.07019.12
5.4.290.0230.08019.41
5.4.280.0270.06719.24
5.4.270.0200.06319.27
5.4.260.0170.06019.33
5.4.250.0230.06319.33
5.4.240.0300.06719.49
5.4.230.0230.05019.33
5.4.220.0170.04319.09
5.4.210.0130.04319.33
5.4.200.0270.03719.33
5.4.190.0130.04019.33
5.4.180.0230.05019.42
5.4.170.0230.07719.33
5.4.160.0300.07319.32
5.4.150.0300.06319.32
5.4.140.0270.04316.52
5.4.130.0130.06016.68
5.4.120.0230.06316.77
5.4.110.0200.06016.72
5.4.100.0170.04716.52
5.4.90.0130.05016.64
5.4.80.0200.03316.70
5.4.70.0200.05316.67
5.4.60.0270.07016.54
5.4.50.0230.06716.70
5.4.40.0200.06716.64
5.4.30.0230.06716.39
5.4.20.0170.05016.70
5.4.10.0200.05716.72
5.4.00.0300.04316.00
5.3.290.0300.05014.82
5.3.280.0330.06314.84
5.3.270.0330.04714.86
5.3.260.0170.07014.71
5.3.250.0230.05714.91
5.3.240.0200.05314.71
5.3.230.0170.06714.90
5.3.220.0270.06714.67
5.3.210.0200.06714.67
5.3.200.0230.05014.82
5.3.190.0300.05014.83
5.3.180.0300.06314.80
5.3.170.0170.03714.66
5.3.160.0230.03314.85
5.3.150.0130.04314.66
5.3.140.0200.06014.66
5.3.130.0270.05014.80
5.3.120.0170.04014.65
5.3.110.0170.07714.69
5.3.100.0170.03714.32
5.3.90.0170.04014.28
5.3.80.0170.03714.11
5.3.70.0100.04014.13
5.3.60.0170.04314.04
5.3.50.0170.03314.17
5.3.40.0130.03714.20
5.3.30.0200.03014.01
5.3.20.0130.03713.85
5.3.10.0170.03713.76
5.3.00.0100.04713.74
5.2.170.0130.02711.96
5.2.160.0030.03711.96
5.2.150.0070.03311.96
5.2.140.0170.02311.96
5.2.130.0100.03011.96
5.2.120.0100.03311.96
5.2.110.0130.03711.96
5.2.100.0100.03711.96
5.2.90.0100.03011.96
5.2.80.0170.02311.96
5.2.70.0130.03311.96
5.2.60.0170.06011.96
5.2.50.0070.03311.96
5.2.40.0030.03311.96
5.2.30.0130.02311.96
5.2.20.0130.02711.96
5.2.10.0070.03011.96
5.2.00.0130.02711.96
5.1.60.0170.03711.96
5.1.50.0130.02711.96
5.1.40.0070.02711.96
5.1.30.0100.02311.96
5.1.20.0100.02311.96
5.1.10.0070.02711.96
5.1.00.0130.03011.96
5.0.50.0070.02011.96
5.0.40.0030.02311.96
5.0.30.0070.02711.96
5.0.20.0070.01711.96
5.0.10.0070.01711.96
5.0.00.0000.03311.96
4.4.90.0100.02011.96
4.4.80.0070.02011.96
4.4.70.0070.01311.96
4.4.60.0070.01311.96
4.4.50.0030.02011.96
4.4.40.0030.02711.96
4.4.30.0070.01311.96
4.4.20.0030.01711.96
4.4.10.0030.01711.96
4.4.00.0030.02711.96
4.3.110.0030.01711.96
4.3.100.0030.02011.96
4.3.90.0030.01711.96
4.3.80.0030.02311.96
4.3.70.0030.01711.96
4.3.60.0030.01311.96
4.3.50.0030.01711.96
4.3.40.0030.02311.96
4.3.30.0000.01711.96
4.3.20.0070.01311.96
4.3.10.0030.01311.96
4.3.00.0000.01711.96

preferences:
56.02 ms | 400 KiB | 5 Q