3v4l.org

run code in 300+ PHP versions simultaneously
<?php $originalString = 'Her (III.1) was the age of 2 years and 11 months. (shoulder a 4/5)'; $findStringArray = array("age", "(III.1)", "2", "months", "4"); $words = explode(" ",$originalString); for($x = 0; $x<count($words); $x++) { foreach($findStringArray as $key => $value) { $words[$x] = preg_replace('/\b('.preg_quote($value).')\b/i', "__", $words[$x]); } } $newstring = implode(" ", $words); echo $newstring;

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.0120.00319.10
8.3.30.0070.00719.22
8.3.20.0040.00420.39
8.3.10.0080.00021.86
8.3.00.0050.00520.82
8.2.170.0070.00722.96
8.2.160.0030.01020.43
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0000.00819.67
8.2.110.0070.00322.38
8.2.100.0040.00817.88
8.2.90.0080.00019.35
8.2.80.0040.00417.97
8.2.70.0040.00417.88
8.2.60.0040.00718.05
8.2.50.0030.00618.07
8.2.40.0040.00418.32
8.2.30.0000.00918.07
8.2.20.0000.00817.97
8.2.10.0040.00418.22
8.2.00.0020.00517.91
8.1.270.0030.00620.82
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00923.97
8.1.230.0080.00419.21
8.1.220.0000.00817.74
8.1.210.0000.00918.77
8.1.200.0060.00617.25
8.1.190.0040.00417.48
8.1.180.0080.00018.10
8.1.170.0080.00018.59
8.1.160.0080.00022.00
8.1.150.0070.00018.88
8.1.140.0040.00417.51
8.1.130.0000.00717.74
8.1.120.0000.00717.63
8.1.110.0030.00617.45
8.1.100.0040.00417.59
8.1.90.0030.00317.64
8.1.80.0000.00817.66
8.1.70.0030.00317.58
8.1.60.0040.00417.77
8.1.50.0040.00417.54
8.1.40.0030.00517.71
8.1.30.0000.00917.72
8.1.20.0040.00417.80
8.1.10.0050.00217.66
8.1.00.0000.00817.64
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.48
8.0.270.0040.00417.30
8.0.260.0030.00317.16
8.0.250.0070.00016.99
8.0.240.0000.00717.03
8.0.230.0000.00717.04
8.0.220.0000.00817.09
8.0.210.0080.00016.96
8.0.200.0000.00617.00
8.0.190.0050.00317.10
8.0.180.0030.00517.13
8.0.170.0000.00917.11
8.0.160.0040.00416.96
8.0.150.0040.00416.96
8.0.140.0000.00717.03
8.0.130.0030.00313.53
8.0.120.0040.00417.01
8.0.110.0040.00417.00
8.0.100.0040.00416.99
8.0.90.0060.00316.88
8.0.80.0120.00417.04
8.0.70.0040.00416.95
8.0.60.0050.00216.87
8.0.50.0080.00016.98
8.0.30.0090.01217.25
8.0.20.0120.01017.40
8.0.10.0000.00717.12
8.0.00.0080.01016.95
7.4.330.0000.00615.03
7.4.320.0060.00016.78
7.4.300.0000.00616.84
7.4.290.0060.00316.70
7.4.280.0040.00416.73
7.4.270.0070.00016.65
7.4.260.0000.00816.71
7.4.250.0040.00416.70
7.4.240.0020.00616.74
7.4.230.0070.00016.55
7.4.220.0140.01416.79
7.4.210.0080.01116.83
7.4.200.0030.00316.84
7.4.160.0110.00516.81
7.4.150.0160.00317.40
7.4.140.0100.00817.86
7.4.130.0110.00616.80
7.4.120.0070.01116.85
7.4.110.0110.00716.81
7.4.100.0090.00916.66
7.4.90.0160.00816.65
7.4.80.0070.01419.39
7.4.70.0090.00616.51
7.4.60.0100.00716.65
7.4.50.0050.00316.44
7.4.40.0140.00516.81
7.4.30.0070.01716.66
7.4.10.0070.01314.91
7.4.00.0070.00915.20
7.3.330.0050.00013.38
7.3.320.0170.00013.32
7.3.310.0030.00316.45
7.3.300.0040.00416.51
7.3.290.0070.00016.48
7.3.280.0090.00816.49
7.3.270.0060.01817.40
7.3.260.0110.01116.59
7.3.250.0180.00316.64
7.3.240.0150.00916.82
7.3.230.0110.01016.52
7.3.210.0100.00616.37
7.3.200.0090.01019.39
7.3.190.0150.00616.57
7.3.180.0130.00916.59
7.3.170.0120.00916.61
7.3.160.0090.00916.46
7.3.130.0060.01315.18
7.3.120.0120.00614.98
7.3.110.0130.00714.97
7.3.100.0040.01114.94
7.3.90.0070.00714.92
7.3.80.0060.00315.23
7.3.70.0070.01114.98
7.3.60.0000.01015.01
7.3.50.0110.00415.01
7.3.40.0070.00315.14
7.3.30.0030.01214.99
7.3.20.0080.00817.07
7.3.10.0070.00716.98
7.3.00.0080.00616.92
7.2.330.0090.00916.82
7.2.320.0100.00716.71
7.2.310.0180.00616.89
7.2.300.0110.00716.66
7.2.290.0060.01316.75
7.2.260.0070.01115.09
7.2.250.0040.01415.07
7.2.240.0070.01014.94
7.2.230.0060.00915.15
7.2.220.0090.00615.29
7.2.210.0000.01115.45
7.2.200.0060.01015.12
7.2.190.0060.00915.30
7.2.180.0000.01315.25
7.2.170.0070.00315.24
7.2.160.0030.01015.33
7.2.150.0060.00617.21
7.2.140.0060.00317.20
7.2.130.0050.01217.08
7.2.120.0050.00917.04
7.2.110.0050.00917.04
7.2.100.0060.00717.02
7.2.90.0050.01017.26
7.2.80.0080.01317.05
7.2.70.0070.01017.31
7.2.60.0060.00617.26
7.2.50.0060.00617.29
7.2.40.0080.00517.00
7.2.30.0050.01017.28
7.2.20.0080.00517.15
7.2.10.0110.00316.97
7.2.00.0040.01118.10
7.1.330.0080.00816.17
7.1.320.0090.00016.04
7.1.310.0000.01616.02
7.1.300.0090.00615.97
7.1.290.0030.01015.71
7.1.280.0070.00715.97
7.1.270.0040.00416.02
7.1.260.0030.01015.88
7.1.250.0030.01215.82
7.1.240.0030.00915.98
7.1.230.0060.00315.76
7.1.220.0070.00315.77
7.1.210.0030.01015.77
7.1.200.0060.00516.06
7.1.190.0000.01415.92
7.1.180.0060.00615.88
7.1.170.0030.00916.07
7.1.160.0030.01315.96
7.1.150.0090.00315.75
7.1.140.0040.00416.18
7.1.130.0000.01415.86
7.1.120.0030.01016.08
7.1.110.0140.00015.84
7.1.100.0140.00217.00
7.1.90.0090.00315.80
7.1.80.0070.01016.04
7.1.70.0020.00816.68
7.1.60.0030.01417.71
7.1.50.0070.01116.56
7.1.40.0050.00516.23
7.1.30.0090.00916.03
7.1.20.0070.01016.06
7.1.10.0070.01015.77
7.1.00.0020.04419.21
7.0.330.0060.00915.54
7.0.320.0090.00615.33
7.0.310.0070.00715.59
7.0.300.0040.01115.67
7.0.290.0100.00015.35
7.0.280.0090.00615.86
7.0.270.0040.01215.57
7.0.260.0070.00315.55
7.0.250.0040.01215.55
7.0.240.0030.01315.41
7.0.230.0090.00315.76
7.0.220.0070.01015.58
7.0.210.0000.01015.66
7.0.200.0030.01116.35
7.0.190.0060.00615.66
7.0.180.0070.00715.81
7.0.170.0090.00615.80
7.0.160.0030.00715.38
7.0.150.0080.00415.63
7.0.140.0050.02018.86
7.0.130.0030.01315.68
7.0.120.0120.00315.72
7.0.110.0000.01615.65
7.0.100.0000.01615.62
7.0.90.0060.00915.57
7.0.80.0030.01315.40
7.0.70.0060.00915.72
7.0.60.0220.03717.83
7.0.50.0060.04316.72
7.0.40.0090.03216.77
7.0.30.0100.04816.89
7.0.20.0230.03516.90
7.0.10.0100.02717.07
7.0.00.0050.04417.05
5.6.400.0090.00614.80
5.6.390.0040.00414.79
5.6.380.0040.01114.66
5.6.370.0070.01014.80
5.6.360.0030.01014.12
5.6.350.0080.00414.90
5.6.340.0040.00414.86
5.6.330.0000.00914.73
5.6.320.0040.01414.49
5.6.310.0060.00914.52
5.6.300.0040.00714.94
5.6.290.0090.00614.56
5.6.280.0130.00014.79
5.6.270.0030.01314.55
5.6.260.0120.00314.57
5.6.250.0040.01114.16
5.6.240.0060.00914.31
5.6.230.0000.01714.63
5.6.220.0070.00714.52
5.6.210.0030.03117.54
5.6.200.0120.01716.33
5.6.190.0030.03317.49
5.6.180.0150.03817.38
5.6.170.0150.03217.46
5.6.160.0020.02717.34
5.6.150.0070.02016.28
5.6.140.0080.04116.26
5.6.130.0070.03916.29
5.6.120.0050.04217.87
5.6.110.0090.03717.64
5.6.100.0060.04717.91
5.6.90.0020.04517.82
5.6.80.0050.04217.48
5.6.70.0040.01214.25
5.6.60.0060.00814.13
5.6.50.0040.00814.54
5.6.40.0060.00614.39
5.6.30.0030.00614.38
5.6.20.0000.01414.74
5.6.10.0060.00314.34
5.6.00.0080.00314.32
5.5.380.0030.00914.51
5.5.370.0030.01214.79
5.5.360.0030.01614.21
5.5.350.0180.03817.53
5.5.340.0030.02516.28
5.5.330.0030.02517.34
5.5.320.0050.04617.10
5.5.310.0200.02417.31
5.5.300.0070.04716.27
5.5.290.0060.03716.24
5.5.280.0030.03117.69
5.5.270.0070.03817.44
5.5.260.0090.04317.66
5.5.250.0060.04317.57
5.5.240.0050.02817.38
5.5.230.0030.00914.38
5.5.220.0000.01214.04
5.5.210.0000.01414.28
5.5.200.0030.01014.24
5.5.190.0040.00714.24
5.5.180.0060.00914.34
5.5.170.0140.00014.07
5.5.160.0110.00014.27
5.5.150.0000.01214.40
5.5.140.0030.01314.29
5.5.130.0040.00414.51
5.5.120.0090.00914.25
5.5.110.0080.00614.55
5.5.100.0040.01414.38
5.5.90.0100.00714.46
5.5.80.0070.00714.23
5.5.70.0030.01014.22
5.5.60.0030.01014.02
5.5.50.0030.01214.01
5.5.40.0120.00314.59
5.5.30.0060.00613.98
5.5.20.0060.00614.52
5.5.10.0040.01014.43
5.5.00.0090.00314.29
5.4.450.0380.04015.45
5.4.440.0580.03715.39
5.4.430.0400.03315.15
5.4.420.0480.03415.38
5.4.410.0030.03414.98
5.4.400.0060.03314.92
5.4.390.0170.03514.88
5.4.380.0120.04015.04
5.4.370.0100.03014.87
5.4.360.0140.03715.02
5.4.350.0120.03214.95
5.4.340.0130.04014.74
5.4.330.0070.00011.13
5.4.320.0120.02714.97
5.4.310.0070.03814.92
5.4.300.0150.02314.90
5.4.290.0070.03314.84
5.4.280.0120.03214.94
5.4.270.0110.03214.88
5.4.260.0090.03014.69
5.4.250.0080.03314.78
5.4.240.0100.03214.91
5.4.230.0070.03114.97
5.4.220.0100.03514.86
5.4.210.0150.02215.02
5.4.200.0090.02713.93
5.4.190.0120.03014.81
5.4.180.0120.02914.93
5.4.170.0130.02514.86
5.4.160.0080.03314.91
5.4.150.0210.03014.81
5.4.140.0130.02513.82
5.4.130.0110.02813.66
5.4.120.0120.02713.72
5.4.110.0090.02713.72
5.4.100.0070.03313.72
5.4.90.0120.02913.90
5.4.80.0080.03013.73
5.4.70.0080.03013.78
5.4.60.0100.02913.72
5.4.50.0170.02013.64
5.4.40.0090.02913.49
5.4.30.0100.03113.78
5.4.20.0060.03113.58
5.4.10.0160.02613.42
5.4.00.0130.02713.43
5.3.290.0270.05314.66
5.3.280.0100.08014.53
5.3.270.0300.06014.67
5.3.260.0130.06014.65
5.3.250.0170.06714.68
5.3.240.0230.05014.76
5.3.230.0170.05014.63
5.3.220.0200.04714.56
5.3.210.0230.04714.55
5.3.200.0170.05314.55
5.3.190.0130.05314.64
5.3.180.0130.05714.55
5.3.170.0130.06014.55
5.3.160.0170.05014.55
5.3.150.0200.04714.55
5.3.140.0130.05314.65
5.3.130.0130.05714.53
5.3.120.0200.05014.52
5.3.110.0100.06014.53
5.3.100.0100.05713.95
5.3.90.0130.05314.12
5.3.80.0100.05713.93
5.3.70.0130.05014.17
5.3.60.0200.04714.10
5.3.50.0170.05013.87
5.3.40.0130.05314.05
5.3.30.0100.05313.92
5.3.20.0130.05313.65
5.3.10.0170.04713.82
5.3.00.0070.05713.63
5.2.170.0130.04311.08
5.2.160.0100.04711.19
5.2.150.0070.05011.21
5.2.140.0130.04711.20
5.2.130.0170.03711.09
5.2.120.0130.04011.09
5.2.110.0170.03711.14
5.2.100.0170.03711.14
5.2.90.0170.03711.16
5.2.80.0100.04311.09
5.2.70.0070.05011.02
5.2.60.0170.04311.04
5.2.50.0100.04311.06
5.2.40.0070.04310.91
5.2.30.0230.03010.94
5.2.20.0070.04310.89
5.2.10.0100.05011.00
5.2.00.0030.04710.78
5.1.60.0100.03710.02
5.1.50.0100.03310.10
5.1.40.0100.0339.95
5.1.30.0100.03710.41
5.1.20.0100.04010.35
5.1.10.0070.04010.10
5.1.00.0100.03710.06
5.0.50.0030.0408.61
5.0.40.0100.0338.45
5.0.30.0070.0438.23
5.0.20.0100.0338.26
5.0.10.0170.0278.26
5.0.00.0070.0478.21
4.4.90.0230.0205.89
4.4.80.0130.0235.84
4.4.70.0000.0305.84
4.4.60.0030.0305.85
4.4.50.0130.0205.89
4.4.40.0000.0435.90
4.4.30.0000.0335.93
4.4.20.0070.0305.98
4.4.10.0030.0275.89
4.4.00.0030.0475.86
4.3.110.0070.0305.84
4.3.100.0130.0135.84
4.3.90.0070.0205.88
4.3.80.0030.0375.82
4.3.70.0100.0175.78
4.3.60.0100.0275.79
4.3.50.0100.0205.80
4.3.40.0100.0305.81
4.3.30.0000.0274.59
4.3.20.0030.0234.58
4.3.10.0130.0134.50
4.3.00.0100.0207.31

preferences:
57.01 ms | 400 KiB | 5 Q