3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "blah &#038; blarh"; $searchReplaceArray = array( '&#038;' => '&', ); $result = str_replace( array_keys($searchReplaceArray), array_values($searchReplaceArray), $string ); $string = "aaaa &#038; aaaa"; echo $result; $string = "bbbb &#038; bbbb"; echo $result;

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.00018.71
8.3.30.0110.00418.92
8.3.20.0090.00020.13
8.3.10.0040.00423.66
8.3.00.0040.00419.11
8.2.170.0140.00722.96
8.2.160.0070.00720.43
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00020.90
8.2.110.0080.00322.20
8.2.100.0070.00317.72
8.2.90.0090.00017.84
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0080.00017.93
8.2.50.0060.00318.07
8.2.40.0000.00819.89
8.2.30.0000.00718.24
8.2.20.0040.00417.68
8.2.10.0070.00018.09
8.2.00.0080.00017.80
8.1.270.0040.00423.93
8.1.260.0030.00626.35
8.1.250.0000.00728.09
8.1.240.0170.00322.46
8.1.230.0070.00321.01
8.1.220.0040.00417.74
8.1.210.0000.00918.89
8.1.200.0070.00317.35
8.1.190.0000.00817.13
8.1.180.0000.00818.88
8.1.170.0080.00418.50
8.1.160.0080.00021.91
8.1.150.0000.00718.58
8.1.140.0000.00717.29
8.1.130.0000.00817.83
8.1.120.0030.00317.32
8.1.110.0000.00817.29
8.1.100.0040.00417.43
8.1.90.0040.00417.36
8.1.80.0030.00517.46
8.1.70.0040.00417.28
8.1.60.0060.00317.43
8.1.50.0000.00717.51
8.1.40.0070.00017.45
8.1.30.0050.00317.52
8.1.20.0030.00517.51
8.1.10.0040.00417.51
8.1.00.0060.00317.36
8.0.300.0000.00719.82
8.0.290.0070.00017.18
8.0.280.0030.00318.49
8.0.270.0030.00317.17
8.0.260.0000.00717.32
8.0.250.0070.00016.84
8.0.240.0000.00616.86
8.0.230.0060.00016.76
8.0.220.0000.00716.77
8.0.210.0030.00316.86
8.0.200.0040.00416.88
8.0.190.0040.00416.92
8.0.180.0000.00716.77
8.0.170.0000.00716.86
8.0.160.0030.00316.73
8.0.150.0000.00816.88
8.0.140.0000.00716.81
8.0.130.0080.00013.22
8.0.120.0000.00816.70
8.0.110.0000.00716.71
8.0.100.0000.00716.73
8.0.90.0000.00716.87
8.0.80.0210.00016.87
8.0.70.0050.00316.81
8.0.60.0070.00016.77
8.0.50.0040.00416.86
8.0.30.0090.01216.87
8.0.20.0110.00817.40
8.0.10.0030.00517.02
8.0.00.0150.00916.59
7.4.330.0030.00315.00
7.4.320.0070.00016.55
7.4.300.0030.00316.53
7.4.290.0000.00716.45
7.4.280.0000.00716.45
7.4.270.0030.00316.57
7.4.260.0000.00816.52
7.4.250.0040.00316.41
7.4.240.0030.00316.44
7.4.230.0000.00716.58
7.4.220.0060.01316.52
7.4.210.0080.00816.55
7.4.200.0030.00316.43
7.4.190.0000.00716.72
7.4.160.0090.00616.42
7.4.150.0110.00717.40
7.4.140.0030.01417.86
7.4.130.0070.00916.40
7.4.120.0070.01016.48
7.4.110.0110.00716.46
7.4.100.0070.01016.40
7.4.90.0030.01416.47
7.4.80.0060.01019.39
7.4.70.0100.00616.32
7.4.60.0100.00716.42
7.4.50.0020.00216.21
7.4.40.0110.00716.36
7.4.30.0130.00616.35
7.4.10.0120.00614.90
7.4.00.0020.01414.82
7.3.330.0000.00513.04
7.3.320.0000.00513.11
7.3.310.0030.00316.26
7.3.300.0030.00316.23
7.3.290.0030.01216.20
7.3.280.0070.00916.18
7.3.270.0090.01217.40
7.3.260.0150.00916.23
7.3.250.0110.00916.31
7.3.240.0160.00216.26
7.3.230.0110.00616.41
7.3.210.0160.00616.30
7.3.200.0030.01419.39
7.3.190.0130.00316.16
7.3.180.0120.00816.27
7.3.170.0090.00616.30
7.3.160.0060.00916.66
7.3.130.0120.00615.03
7.3.120.0030.01214.73
7.3.110.0130.00314.51
7.3.100.0160.00014.47
7.3.90.0060.00914.82
7.3.80.0100.00314.63
7.3.70.0090.00914.73
7.3.60.0090.00614.76
7.3.50.0110.00014.41
7.3.40.0030.01014.59
7.3.30.0110.00014.82
7.3.20.0030.01016.41
7.3.10.0100.00316.29
7.3.00.0000.01216.52
7.2.330.0070.01016.34
7.2.320.0100.01316.60
7.2.310.0100.00716.66
7.2.300.0080.00816.71
7.2.290.0090.01516.66
7.2.260.0070.01414.91
7.2.250.0060.01314.77
7.2.240.0000.01415.03
7.2.230.0100.01014.77
7.2.220.0000.02014.91
7.2.210.0070.00314.78
7.2.200.0100.00614.98
7.2.190.0150.00015.08
7.2.180.0060.00314.80
7.2.170.0090.00615.12
7.2.160.0040.00814.99
7.2.150.0030.01216.84
7.2.140.0110.00316.93
7.2.130.0080.00416.86
7.2.120.0040.00816.87
7.2.110.0000.00916.90
7.2.100.0000.01316.76
7.2.90.0060.00616.85
7.2.80.0040.01217.05
7.2.70.0070.01016.61
7.2.60.0070.01016.79
7.2.50.0040.01116.84
7.2.40.0070.00717.05
7.2.30.0030.01016.80
7.2.20.0030.00616.95
7.2.10.0060.00916.73
7.2.00.0140.00016.86
7.1.330.0030.01015.76
7.1.320.0040.00815.69
7.1.310.0100.00615.96
7.1.300.0140.00015.92
7.1.290.0000.00915.74
7.1.280.0060.00315.71
7.1.270.0030.01015.82
7.1.260.0030.00715.78
7.1.250.0000.01215.53
7.1.240.0000.01315.46
7.1.230.0040.00815.56
7.1.220.0120.00315.73
7.1.210.0040.00815.62
7.1.200.0000.01515.82
7.1.190.0100.00315.75
7.1.180.0040.00715.70
7.1.170.0070.00415.55
7.1.160.0040.00415.61
7.1.150.0000.00815.81
7.1.140.0070.01015.49
7.1.130.0080.00815.54
7.1.120.0000.01315.94
7.1.110.0110.00015.67
7.1.100.0050.00717.03
7.1.90.0040.01115.76
7.1.80.0030.01015.64
7.1.70.0100.00016.33
7.1.60.0070.00917.60
7.1.50.0000.01216.32
7.1.40.0000.01015.94
7.1.30.0120.00015.73
7.1.20.0070.00715.87
7.1.10.0030.01315.62
7.1.00.0030.04119.15
7.0.330.0030.01015.44
7.0.320.0110.00315.22
7.0.310.0070.00715.14
7.0.300.0070.00715.35
7.0.290.0100.00315.34
7.0.280.0080.00415.34
7.0.270.0060.00915.39
7.0.260.0030.01015.36
7.0.250.0030.01015.17
7.0.240.0000.00815.46
7.0.230.0080.00415.55
7.0.220.0070.00715.23
7.0.210.0090.00015.42
7.0.200.0070.00316.07
7.0.190.0030.00815.35
7.0.180.0070.00715.59
7.0.170.0030.01015.48
7.0.160.0000.01115.32
7.0.150.0040.00715.46
7.0.140.0050.03718.81
7.0.130.0100.00315.59
7.0.120.0030.00915.57
7.0.110.0000.00815.33
7.0.100.0040.00415.13
7.0.90.0040.01115.03
7.0.80.0070.00715.47
7.0.70.0040.00715.42
7.0.60.0090.04217.60
7.0.50.0060.04116.62
7.0.40.0050.03116.74
7.0.30.0170.02016.63
7.0.20.0160.04116.88
7.0.10.0100.04316.92
7.0.00.0080.04516.74
5.6.400.0060.00614.32
5.6.390.0000.00814.36
5.6.380.0030.00514.28
5.6.370.0070.00714.52
5.6.360.0070.01014.30
5.6.350.0000.01413.93
5.6.340.0000.01614.46
5.6.330.0030.00614.45
5.6.320.0040.01114.38
5.6.310.0040.00714.46
5.6.300.0070.00714.31
5.6.290.0070.00714.51
5.6.280.0000.01114.35
5.6.270.0060.00614.41
5.6.260.0000.01213.91
5.6.250.0000.01314.38
5.6.240.0070.00714.28
5.6.230.0000.01314.25
5.6.220.0030.00914.25
5.6.210.0090.04317.47
5.6.200.0030.04716.08
5.6.190.0060.03317.58
5.6.180.0180.03317.57
5.6.170.0170.02817.56
5.6.160.0020.03517.47
5.6.150.0050.02516.31
5.6.140.0060.04516.29
5.6.130.0030.04816.25
5.6.120.0070.04217.82
5.6.110.0070.03817.71
5.6.100.0170.03517.65
5.6.90.0100.04517.69
5.6.80.0100.04217.35
5.6.70.0080.00414.47
5.6.60.0060.00314.07
5.6.50.0140.00014.28
5.6.40.0000.01414.31
5.6.30.0040.00714.33
5.6.20.0060.00614.29
5.6.10.0000.01014.13
5.6.00.0000.01214.23
5.5.380.0030.00814.25
5.5.370.0070.00713.97
5.5.360.0080.00614.06
5.5.350.0050.04617.21
5.5.340.0070.02716.12
5.5.330.0050.04817.24
5.5.320.0250.03717.32
5.5.310.0130.03117.36
5.5.300.0030.04016.02
5.5.290.0070.02416.13
5.5.280.0030.02417.54
5.5.270.0070.03517.64
5.5.260.0060.03617.57
5.5.250.0060.03317.37
5.5.240.0120.04117.30
5.5.230.0030.01014.18
5.5.220.0120.00013.95
5.5.210.0060.00314.06
5.5.200.0030.00714.14
5.5.190.0060.00614.16
5.5.180.0030.01014.07
5.5.170.0060.00614.09
5.5.160.0040.01114.07
5.5.150.0060.00914.00
5.5.140.0090.00014.34
5.5.130.0000.01314.22
5.5.120.0060.00314.13
5.5.110.0000.01014.25
5.5.100.0030.01314.04
5.5.90.0070.01014.26
5.5.80.0030.00514.20
5.5.70.0050.00514.08
5.5.60.0080.00414.19
5.5.50.0050.01313.93
5.5.40.0050.00513.98
5.5.30.0080.01114.40
5.5.20.0060.00614.32
5.5.10.0040.01514.43
5.5.00.0030.01413.87
5.4.450.0370.03515.83
5.4.440.0130.02815.92
5.4.430.0170.03515.74
5.4.420.0070.03215.94
5.4.410.0260.03515.76
5.4.400.0400.02815.68
5.4.390.0430.02815.75
5.4.380.0180.02815.46
5.4.370.0230.02615.47
5.4.360.0200.02815.43
5.4.350.0230.02815.39
5.4.340.0220.03015.35
5.4.330.0060.00612.21
5.4.320.0060.02112.33
5.4.310.0020.02312.33
5.4.300.0080.02112.33
5.4.290.0040.02112.33
5.4.280.0020.02612.28
5.4.270.0040.02512.28
5.4.260.0080.02212.28
5.4.250.0020.02812.28
5.4.240.0090.02312.28
5.4.230.0050.02512.28
5.4.220.0040.02512.28
5.4.210.0090.02412.27
5.4.200.0080.02712.28
5.4.190.0070.02612.27
5.4.180.0040.02312.27
5.4.170.0040.02412.28
5.4.160.0080.02012.28
5.4.150.0090.02112.27
5.4.140.0040.02412.12
5.4.130.0080.02412.11
5.4.120.0040.02312.09
5.4.110.0040.02212.09
5.4.100.0050.02112.09
5.4.90.0020.02512.09
5.4.80.0070.02112.09
5.4.70.0040.02012.09
5.4.60.0050.02112.09
5.4.50.0040.02412.08
5.4.40.0050.02112.08
5.4.30.0060.02012.08
5.4.20.0090.01712.08
5.4.10.0060.02112.08
5.4.00.0070.02011.82
5.3.290.0070.02812.51
5.3.280.0060.02012.46
5.3.270.0020.02712.46
5.3.260.0060.02212.47
5.3.250.0030.02312.46
5.3.240.0080.02812.47
5.3.230.0070.02812.46
5.3.220.0040.03112.45
5.3.210.0050.02712.45
5.3.200.0070.02412.45
5.3.190.0050.02612.45
5.3.180.0050.02412.44
5.3.170.0090.02012.44
5.3.160.0060.03012.44
5.3.150.0040.03112.44
5.3.140.0080.02812.44
5.3.130.0050.03212.43
5.3.120.0100.02812.43
5.3.110.0040.03412.43
5.3.100.0070.02912.16
5.3.90.0050.03312.14
5.3.80.0050.03012.14
5.3.70.0060.02712.14
5.3.60.0040.03112.14
5.3.50.0080.02612.11
5.3.40.0070.02812.11
5.3.30.0060.02612.08
5.3.20.0100.02411.97
5.3.10.0090.01911.95
5.3.00.0040.04111.94
5.2.170.0050.0479.18
5.2.160.0070.0309.18
5.2.150.0060.0409.18
5.2.140.0130.0359.17
5.2.130.0060.0419.13
5.2.120.0060.0379.13
5.2.110.0060.0339.14
5.2.100.0080.0379.14
5.2.90.0090.0419.14
5.2.80.0040.0469.13
5.2.70.0100.0529.13
5.2.60.0060.0359.09
5.2.50.0040.0309.05
5.2.40.0050.0289.03
5.2.30.0050.0299.01
5.2.20.0090.0259.00
5.2.10.0070.0388.92
5.2.00.0060.0298.78
5.1.60.0050.0238.06
5.1.50.0050.0238.05
5.1.40.0070.0248.04
5.1.30.0050.0278.39
5.1.20.0030.0308.41
5.1.10.0050.0318.13
5.1.00.0060.0278.13
5.0.50.0040.0206.62
5.0.40.0050.0186.48
5.0.30.0020.0436.29
5.0.20.0040.0196.26
5.0.10.0040.0216.23
5.0.00.0070.0286.23
4.4.90.0040.0184.78
4.4.80.0030.0164.75
4.4.70.0030.0164.75
4.4.60.0040.0154.76
4.4.50.0050.0134.77
4.4.40.0030.0264.71
4.4.30.0030.0184.76
4.4.20.0030.0194.84
4.4.10.0050.0224.85
4.4.00.0020.0274.76
4.3.110.0000.0194.67
4.3.100.0030.0154.66
4.3.90.0010.0174.64
4.3.80.0060.0234.59
4.3.70.0060.0124.63
4.3.60.0010.0244.63
4.3.50.0060.0204.63
4.3.40.0030.0334.53
4.3.30.0050.0153.28
4.3.20.0020.0223.26
4.3.10.0020.0193.22
4.3.00.0130.0237.53

preferences:
42.01 ms | 400 KiB | 5 Q