3v4l.org

run code in 300+ PHP versions simultaneously
<?php $teste = ' <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <composition ownerId="9" ownerName="Innom" version="0.2" id="7360b6258a0336d14cbce7246a1e9c46" name="I Wont Give It Away"> <tracks> <track id="1" userId="9" userName="Innom" collaborationId="0" trackType="9" volume="100"></track> <track id="1" userId="9" userName="Innom" collaborationId="0" trackType="9" volume="100"></track> <track id="1" userId="9" userName="Innom" collaborationId="0" trackType="9" volume="100"></track> </tracks> <records> <record id="63e7a25d022e2a29b149b6686c446871" userId="9" frames="9668736"/> <record id="63e7a25d022e2a29b149b6686c446871" userId="9" frames="9668736"/> <record id="63e7a25d022e2a29b149b6686c446871" userId="9" frames="9668736"/> </records> </composition> </rss> '; $asd = substr_count($teste, '<record id'); for ($i = 1; $i <= $asd; $i++) { $teste = str_replace('collaborationId="0"', 'collaborationId="'.$i.'"', $teste, $i); } echo $teste;

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.0100.00716.75
8.3.50.0140.00722.16
8.3.40.0120.00318.59
8.3.30.0110.00319.04
8.3.20.0000.00720.39
8.3.10.0060.00323.53
8.3.00.0040.00419.13
8.2.180.0090.00618.04
8.2.170.0070.00722.96
8.2.160.0070.00720.36
8.2.150.0100.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00822.20
8.2.110.0060.00322.23
8.2.100.0110.00017.72
8.2.90.0000.00719.05
8.2.80.0000.00817.97
8.2.70.0100.00017.61
8.2.60.0030.00517.68
8.2.50.0040.00418.07
8.2.40.0040.00419.97
8.2.30.0070.00018.20
8.2.20.0000.00717.75
8.2.10.0070.00018.11
8.2.00.0040.00417.77
8.1.280.0170.00325.92
8.1.270.0040.00422.05
8.1.260.0030.00526.35
8.1.250.0090.00028.09
8.1.240.0060.00323.96
8.1.230.0040.00719.12
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0050.00317.00
8.1.180.0000.00718.10
8.1.170.0080.00018.58
8.1.160.0000.00721.96
8.1.150.0000.00818.70
8.1.140.0040.00417.46
8.1.130.0030.00317.82
8.1.120.0040.00417.38
8.1.110.0000.00717.49
8.1.100.0040.00417.46
8.1.90.0000.00717.36
8.1.80.0000.00717.33
8.1.70.0000.00717.41
8.1.60.0000.00817.62
8.1.50.0040.00417.37
8.1.40.0030.00617.54
8.1.30.0040.00417.70
8.1.20.0000.00817.65
8.1.10.0030.00617.51
8.1.00.0040.00417.46
8.0.300.0070.00018.77
8.0.290.0040.00417.05
8.0.280.0070.00018.45
8.0.270.0000.00717.29
8.0.260.0000.00617.27
8.0.250.0000.00716.96
8.0.240.0030.00316.93
8.0.230.0030.00316.93
8.0.220.0000.00716.83
8.0.210.0000.00716.86
8.0.200.0070.00017.02
8.0.190.0030.00616.88
8.0.180.0040.00416.88
8.0.170.0060.00316.81
8.0.160.0080.00016.89
8.0.150.0040.00316.81
8.0.140.0000.00716.86
8.0.130.0080.00013.35
8.0.120.0080.00016.79
8.0.110.0040.00416.79
8.0.100.0000.00816.77
8.0.90.0070.00016.85
8.0.80.0030.01316.86
8.0.70.0000.00716.71
8.0.60.0000.00716.78
8.0.50.0050.00216.85
8.0.30.0090.00917.33
8.0.20.0160.00517.40
8.0.10.0040.00416.97
8.0.00.0150.00716.67
7.4.330.0020.00215.00
7.4.320.0000.00716.50
7.4.300.0000.00616.41
7.4.290.0030.00316.46
7.4.280.0000.00816.54
7.4.270.0030.00316.64
7.4.260.0030.00316.58
7.4.250.0040.00416.55
7.4.240.0040.00416.54
7.4.230.0070.00016.25
7.4.220.0030.01616.52
7.4.210.0090.00816.63
7.4.200.0030.00316.44
7.4.190.0070.00016.56
7.4.160.0060.01516.50
7.4.150.0060.01217.40
7.4.140.0140.00517.86
7.4.130.0120.00616.56
7.4.120.0050.01316.53
7.4.110.0030.01316.40
7.4.100.0060.01316.75
7.4.90.0160.00316.39
7.4.80.0120.01119.39
7.4.70.0090.00616.57
7.4.60.0100.01016.47
7.4.50.0040.00416.54
7.4.40.0070.01016.42
7.4.30.0070.01016.62
7.4.00.0070.01015.13
7.3.330.0000.00513.18
7.3.320.0000.00513.21
7.3.310.0070.00016.09
7.3.300.0000.00716.29
7.3.290.0070.00716.28
7.3.280.0070.01016.31
7.3.270.0070.01017.40
7.3.260.0100.00716.36
7.3.250.0130.00816.44
7.3.240.0110.01116.38
7.3.230.0100.00716.60
7.3.210.0100.00716.32
7.3.200.0070.01019.39
7.3.190.0030.01316.33
7.3.180.0030.01316.43
7.3.170.0150.00016.66
7.3.160.0060.00916.42
7.3.120.0030.01314.67
7.2.330.0100.01016.76
7.2.320.0120.00716.47
7.2.310.0100.01116.42
7.2.300.0060.01616.73
7.2.290.0130.00616.50
7.2.00.0040.01119.49
7.1.100.0030.00918.12
7.1.70.0000.00717.15
7.1.60.0110.01419.46
7.1.50.0070.01617.02
7.1.00.0100.07022.25
7.0.200.0000.01516.63
7.0.140.0130.06322.01
7.0.60.0100.04719.91
7.0.50.0030.08317.89
7.0.40.0100.03720.02
7.0.30.0200.04020.02
7.0.20.0170.06320.17
7.0.10.0030.09020.04
7.0.00.0030.07720.32
5.6.280.0000.07720.89
5.6.210.0230.07720.60
5.6.200.0030.04018.18
5.6.190.0070.07020.45
5.6.180.0500.06720.33
5.6.170.0200.04720.46
5.6.160.0100.08720.50
5.6.150.0070.05318.09
5.6.140.0070.07718.11
5.6.130.0100.06318.11
5.6.120.0100.08021.13
5.6.110.0030.08321.08
5.6.100.0230.07020.98
5.6.90.0100.08020.96
5.6.80.0030.09020.49
5.5.350.0370.06720.39
5.5.340.0030.06017.98
5.5.330.0130.07720.57
5.5.320.0270.07320.27
5.5.310.0270.08720.29
5.5.300.0100.07317.88
5.5.290.0030.06317.92
5.5.280.0030.08720.88
5.5.270.0130.07020.79
5.5.260.0100.04020.77
5.5.250.0070.08320.61
5.5.240.0000.07320.29
5.4.450.0800.06019.63
5.4.440.0370.07319.47
5.4.430.0230.07019.40
5.4.420.0270.06019.06
5.4.410.0200.05019.32
5.4.400.0300.05319.26
5.4.390.0070.06019.15
5.4.380.0230.05718.75
5.4.370.0400.06718.72
5.4.360.0300.05318.66
5.4.350.0300.05318.51
5.4.340.0370.05018.55
5.4.320.0070.04012.46
5.4.310.0020.04112.45
5.4.300.0080.04112.45
5.4.290.0120.06112.45
5.4.280.0220.07512.35
5.4.270.0140.05012.35
5.4.260.0190.06012.35
5.4.250.0140.04612.35
5.4.240.0070.04912.35
5.4.230.0080.06112.34
5.4.220.0090.04812.34
5.4.210.0170.06712.34
5.4.200.0160.05912.34
5.4.190.0330.05412.34
5.4.180.0120.05912.34
5.4.170.0120.06812.35
5.4.160.0120.04612.35
5.4.150.0090.04712.34
5.4.140.0130.05812.02
5.4.130.0250.08112.01
5.4.120.0100.03811.98
5.4.110.0140.04511.97
5.4.100.0040.04011.97
5.4.90.0060.04611.96
5.4.80.0080.04611.96
5.4.70.0100.04411.96
5.4.60.0060.04211.96
5.4.50.0180.05111.96
5.4.40.0170.06711.95
5.4.30.0130.06811.95
5.4.20.0230.07511.95
5.4.10.0110.05311.95
5.4.00.0120.07011.44
5.3.290.0050.03912.80
5.3.280.0250.09112.71
5.3.270.0200.05812.72
5.3.260.0450.08812.72
5.3.250.0080.04812.72
5.3.240.0080.06612.72
5.3.230.0160.05112.70
5.3.220.0140.05812.68
5.3.210.0170.07812.68
5.3.200.0140.08112.68
5.3.190.0190.06012.68
5.3.180.0070.03812.68
5.3.170.0080.04312.67
5.3.160.0150.05912.67
5.3.150.0180.07012.67
5.3.140.0110.05712.66
5.3.130.0120.04612.66
5.3.120.0330.05212.66
5.3.110.0280.07012.66
5.3.100.0150.06912.12
5.3.90.0090.06212.08
5.3.80.0090.04612.08
5.3.70.0110.04412.07
5.3.60.0060.04712.07
5.3.50.0120.04612.00
5.3.40.0080.04712.00
5.3.30.0090.05111.94
5.3.20.0140.06811.72
5.3.10.0130.06611.69
5.3.00.0180.06511.68
5.2.170.0100.0429.18
5.2.160.0130.0659.18
5.2.150.0100.0619.18
5.2.140.0140.0509.18
5.2.130.0110.0529.14
5.2.120.0180.0539.14
5.2.110.0060.0339.14
5.2.100.0170.0539.14
5.2.90.0190.0629.14
5.2.80.0170.0559.13
5.2.70.0150.0569.14
5.2.60.0130.0649.09
5.2.50.0030.0499.06
5.2.40.0070.0439.04
5.2.30.0130.0359.00
5.2.20.0090.0409.00
5.2.10.0110.0348.94
5.2.00.0180.0568.79
5.1.60.0090.0628.08
5.1.50.0030.0308.08
5.1.40.0100.0388.06
5.1.30.0070.0298.41
5.1.20.0050.0318.43
5.1.10.0080.0498.16
5.1.00.0070.0298.16
5.0.50.0070.0316.63
5.0.40.0080.0206.49
5.0.30.0040.0356.31
5.0.20.0050.0216.27
5.0.10.0130.0436.25
5.0.00.0030.0416.24
4.4.90.0120.0314.78
4.4.80.0090.0374.75
4.4.70.0050.0204.75
4.4.60.0030.0234.75
4.4.50.0060.0214.77
4.4.40.0060.0414.71
4.4.30.0070.0284.76
4.4.20.0090.0494.85
4.4.10.0030.0284.85
4.4.00.0020.0634.76
4.3.110.0090.0224.67
4.3.100.0050.0364.66
4.3.90.0080.0354.63
4.3.80.0100.0494.58
4.3.70.0100.0354.63
4.3.60.0040.0454.63
4.3.50.0150.0444.63
4.3.40.0110.0614.54
4.3.30.0080.0413.29
4.3.20.0070.0353.27
4.3.10.0100.0443.23
4.3.00.0070.0209.06

preferences:
44.44 ms | 401 KiB | 5 Q