3v4l.org

run code in 300+ PHP versions simultaneously
<?php function replacelist($thetext) { $seachfor = array("crackers","soup"); $replacewith = array("shapes","stew"); $newtext = str_replace($searchfor, $replacewith, $thetext); return $newtext." - plus some test text"; } ?> <?php $mytext="Animal crackers in my soup"; $newphrase = replacelist($mytext); echo $newphrase; ?>

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.00718.39
8.3.50.0100.00718.05
8.3.40.0110.00419.02
8.3.30.0110.00419.07
8.3.20.0080.00020.34
8.3.10.0000.00723.70
8.3.00.0130.00620.84
8.2.180.0110.01116.88
8.2.170.0070.01122.96
8.2.160.0090.00920.53
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0060.00320.84
8.2.110.0060.00322.25
8.2.100.0180.00017.65
8.2.90.0000.00819.22
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0080.00017.93
8.2.50.0040.00418.07
8.2.40.0040.00418.29
8.2.30.0000.00918.00
8.2.20.0040.00417.59
8.2.10.0000.00718.07
8.2.00.0000.00717.75
8.1.270.0050.00322.06
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0130.00923.92
8.1.230.0110.00019.08
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0050.00317.23
8.1.180.0060.00318.10
8.1.170.0050.00318.79
8.1.160.0030.00518.84
8.1.150.0000.00718.58
8.1.140.0040.00417.34
8.1.130.0030.00317.84
8.1.120.0030.00517.33
8.1.110.0050.00217.30
8.1.100.0070.00317.45
8.1.90.0040.00417.26
8.1.80.0000.00817.34
8.1.70.0040.00417.38
8.1.60.0040.00417.48
8.1.50.0000.00817.45
8.1.40.0050.00317.59
8.1.30.0040.00417.59
8.1.20.0040.00417.71
8.1.10.0050.00217.48
8.1.00.0030.00517.54
8.0.300.0070.00018.77
8.0.290.0090.00016.88
8.0.280.0000.00718.46
8.0.270.0000.00817.27
8.0.260.0040.00417.32
8.0.250.0000.00816.89
8.0.240.0060.00316.94
8.0.230.0030.00416.89
8.0.220.0030.00316.96
8.0.210.0040.00416.89
8.0.200.0070.00316.95
8.0.190.0000.00716.87
8.0.180.0000.00716.84
8.0.170.0070.00016.94
8.0.160.0030.00316.85
8.0.150.0070.00016.95
8.0.140.0000.00816.70
8.0.130.0000.00613.33
8.0.120.0050.00316.88
8.0.110.0000.00716.84
8.0.100.0070.00016.82
8.0.90.0000.00716.96
8.0.80.0090.00916.87
8.0.70.0000.00716.93
8.0.60.0000.00716.94
8.0.50.0030.00516.73
8.0.30.0070.01217.12
8.0.20.0060.01217.40
8.0.10.0050.00316.85
8.0.00.0080.00916.93
7.4.330.0020.00215.00
7.4.320.0030.00316.46
7.4.300.0000.00916.49
7.4.290.0090.00016.47
7.4.280.0040.00416.50
7.4.270.0000.00716.56
7.4.260.0060.00316.44
7.4.250.0000.00716.47
7.4.240.0020.00516.50
7.4.230.0090.00016.41
7.4.220.0100.01316.40
7.4.210.0070.00716.64
7.4.200.0030.00316.70
7.4.160.0060.01016.46
7.4.150.0130.00617.40
7.4.140.0070.01117.86
7.4.130.0100.00716.56
7.4.120.0100.00816.54
7.4.110.0070.01116.58
7.4.100.0100.01016.45
7.4.90.0150.00316.46
7.4.80.0140.00419.39
7.4.70.0100.00616.62
7.4.60.0120.00616.33
7.4.50.0000.00816.45
7.4.40.0050.01116.55
7.4.30.0090.00916.59
7.4.00.0030.01414.99
7.3.330.0000.00513.37
7.3.320.0030.00313.18
7.3.310.0030.00316.22
7.3.300.0030.00316.28
7.3.290.0000.01516.39
7.3.280.0070.01016.39
7.3.270.0100.00717.40
7.3.260.0130.00316.38
7.3.250.0140.00416.54
7.3.240.0030.01316.52
7.3.230.0150.00816.55
7.3.210.0080.00816.43
7.3.200.0090.00619.39
7.3.190.0060.01016.45
7.3.180.0090.00616.63
7.3.170.0130.00616.35
7.3.160.0070.01316.49
7.3.120.0060.01015.02
7.3.110.0060.01215.05
7.3.100.0070.01114.94
7.3.90.0120.00614.95
7.3.80.0100.00714.77
7.3.70.0000.01014.88
7.3.60.0070.00714.75
7.3.50.0100.00314.86
7.3.40.0080.00414.96
7.3.30.0030.01014.96
7.3.20.0090.00616.68
7.3.10.0070.00716.46
7.3.00.0030.01416.75
7.2.330.0100.01316.59
7.2.320.0170.00016.75
7.2.310.0150.00416.74
7.2.300.0080.00816.71
7.2.290.0150.00816.71
7.2.250.0130.00715.10
7.2.240.0030.01415.01
7.2.230.0070.01014.80
7.2.220.0090.00914.97
7.2.210.0090.00915.09
7.2.200.0030.00615.25
7.2.190.0000.01214.96
7.2.180.0040.01214.90
7.2.170.0070.00715.03
7.2.00.0040.00719.28
7.1.330.0040.01215.79
7.1.320.0100.00715.89
7.1.310.0030.01315.59
7.1.300.0030.01015.66
7.1.290.0070.00415.71
7.1.280.0030.01015.63
7.1.270.0030.00515.44
7.1.260.0110.00415.86
7.1.100.0040.01417.71
7.1.70.0050.00317.27
7.1.60.0100.01419.70
7.1.50.0070.00717.07
7.1.00.0070.07322.36
7.0.200.0150.00716.36
7.0.140.0070.07022.21
7.0.60.0030.04320.03
7.0.50.0070.03717.88
7.0.40.0070.09020.26
7.0.30.0370.04320.07
7.0.20.0300.08320.23
7.0.10.0270.05020.11
7.0.00.0170.05320.12
5.6.280.0070.07021.13
5.6.210.0030.08020.52
5.6.200.0130.08318.14
5.6.190.0070.04720.34
5.6.180.0330.07020.61
5.6.170.0270.08320.48
5.6.160.0070.08320.46
5.6.150.0130.07718.19
5.6.140.0100.03318.19
5.6.130.0000.06018.19
5.6.120.0130.04020.97
5.6.110.0300.04721.03
5.6.100.0100.03721.00
5.6.90.0070.07321.00
5.6.80.0070.05720.41
5.6.70.0300.07020.40
5.5.350.0100.06320.45
5.5.340.0100.05017.95
5.5.330.0070.08720.27
5.5.320.0230.08020.32
5.5.310.0300.07720.20
5.5.300.0100.03717.98
5.5.290.0100.05318.05
5.5.280.0070.05020.78
5.5.270.0030.04320.97
5.5.260.0030.04320.65
5.5.250.0070.09020.72
5.5.240.0130.07320.32
5.4.450.0200.06319.48
5.4.440.0900.06319.70
5.4.430.0930.05019.45
5.4.420.0870.05319.34
5.4.410.1100.04319.48
5.4.400.0970.06018.84
5.4.390.1100.05318.76
5.4.380.0270.05018.80
5.4.370.0470.05318.81
5.4.360.0330.05318.70
5.4.350.0080.04912.02
5.4.340.0080.03512.02
5.4.320.0040.03812.51
5.4.310.0080.03512.50
5.4.300.0100.04212.50
5.4.290.0140.04412.50
5.4.280.0080.04112.40
5.4.270.0100.04612.40
5.4.260.0100.05012.40
5.4.250.0090.05012.40
5.4.240.0070.04512.40
5.4.230.0060.04612.39
5.4.220.0100.03912.39
5.4.210.0120.03412.39
5.4.200.0090.04012.39
5.4.190.0080.04212.38
5.4.180.0110.03612.38
5.4.170.0080.04412.39
5.4.160.0090.04012.39
5.4.150.0090.03912.39
5.4.140.0070.04612.07
5.4.130.0100.03812.06
5.4.120.0110.04112.02
5.4.110.0100.03612.01
5.4.100.0080.03712.01
5.4.90.0070.04712.02
5.4.80.0070.05012.01
5.4.70.0090.03812.01
5.4.60.0060.04012.01
5.4.50.0080.03812.01
5.4.40.0070.04611.99
5.4.30.0090.04811.99
5.4.20.0100.05011.99
5.4.10.0150.04312.00
5.4.00.0080.04911.48
5.3.290.0060.04012.80
5.3.280.0060.04612.70
5.3.270.0060.04712.72
5.3.260.0080.05312.72
5.3.250.0130.04712.72
5.3.240.0080.05112.72
5.3.230.0100.04612.70
5.3.220.0070.03912.68
5.3.210.0120.04912.68
5.3.200.0110.04912.68
5.3.190.0130.04512.68
5.3.180.0090.05012.68
5.3.170.0090.04112.67
5.3.160.0080.04112.68
5.3.150.0070.05012.68
5.3.140.0050.04312.66
5.3.130.0110.04212.66
5.3.120.0070.04612.66
5.3.110.0080.04112.65
5.3.100.0070.04812.12
5.3.90.0080.05312.10
5.3.80.0070.04612.09
5.3.70.0100.04212.09
5.3.60.0070.05012.08
5.3.50.0090.04812.02
5.3.40.0100.03712.02
5.3.30.0080.03511.98
5.3.20.0060.03611.77
5.3.10.0040.04011.73
5.3.00.0060.04211.71
5.2.170.0090.0339.21
5.2.160.0050.0359.21
5.2.150.0040.0339.22
5.2.140.0040.0349.21
5.2.130.0070.0329.17
5.2.120.0060.0429.17
5.2.110.0040.0429.18
5.2.100.0070.0419.18
5.2.90.0070.0419.18
5.2.80.0050.0449.17
5.2.70.0060.0439.17
5.2.60.0070.0429.13
5.2.50.0040.0449.09
5.2.40.0050.0419.07
5.2.30.0040.0449.05
5.2.20.0040.0429.04
5.2.10.0080.0298.94
5.2.00.0050.0438.80
5.1.60.0050.0378.09
5.1.50.0070.0348.08
5.1.40.0040.0388.06
5.1.30.0070.0418.41
5.1.20.0090.0358.43
5.1.10.0120.0308.16
5.1.00.0060.0388.16
5.0.50.0070.0266.63
5.0.40.0050.0216.50
5.0.30.0060.0416.30
5.0.20.0060.0256.28
5.0.10.0040.0296.25
5.0.00.0080.0396.25
4.4.90.0060.0214.78
4.4.80.0040.0224.75
4.4.70.0040.0254.75
4.4.60.0040.0254.75
4.4.50.0030.0264.77
4.4.40.0070.0364.71
4.4.30.0040.0244.76
4.4.20.0060.0234.85
4.4.10.0030.0254.85
4.4.00.0050.0354.76
4.3.110.0040.0244.67
4.3.100.0060.0204.67
4.3.90.0050.0214.63
4.3.80.0040.0334.59
4.3.70.0040.0224.63
4.3.60.0060.0214.63
4.3.50.0030.0244.63
4.3.40.0030.0354.54
4.3.30.0030.0233.30
4.3.20.0020.0243.28
4.3.10.0050.0213.24
4.3.00.0000.0237.15

preferences:
62.95 ms | 400 KiB | 5 Q