3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '100% Pure Body Butters French Lavender 3.4 fl. Oz'; $replacements = array( 'oz' => '', 'Oz' => '', 'fl.'=> '' ); $delimiter = '/'; $words = array_keys( $replacements); $regex = $delimiter . '\b(' . implode('|', array_map( 'preg_quote', $words, array_fill( 0, count( $words), $delimiter))) . ')\b' . $delimiter; $result = preg_replace_callback( $regex, function( $match) use( $replacements) { return $replacements[$match[1]]; }, $string); 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.60.0140.00718.36
8.3.50.0110.00621.15
8.3.40.0120.00318.86
8.3.30.0000.01420.34
8.3.20.0040.00418.88
8.3.10.0060.00321.13
8.3.00.0050.00323.65
8.2.180.0170.00716.32
8.2.170.0120.00322.96
8.2.160.0070.00720.44
8.2.150.0120.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0070.00019.85
8.2.110.0090.00019.45
8.2.100.0070.00418.09
8.2.90.0080.00019.30
8.2.80.0040.00419.28
8.2.70.0060.00617.88
8.2.60.0040.00418.03
8.2.50.0030.00518.07
8.2.40.0110.00018.34
8.2.30.0000.00819.46
8.2.20.0040.00417.91
8.2.10.0000.00817.97
8.2.00.0000.00917.88
8.1.280.0060.01225.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0100.00728.09
8.1.240.0100.00022.67
8.1.230.0070.00320.95
8.1.220.0030.00518.77
8.1.210.0040.00418.82
8.1.200.0090.00017.38
8.1.190.0040.00417.65
8.1.180.0040.00418.10
8.1.170.0000.00818.70
8.1.160.0040.00418.90
8.1.150.0000.00718.74
8.1.140.0020.00517.66
8.1.130.0000.00717.92
8.1.120.0040.00417.69
8.1.110.0000.00717.62
8.1.100.0000.00717.52
8.1.90.0000.00817.58
8.1.80.0030.00417.63
8.1.70.0040.00417.51
8.1.60.0040.00417.79
8.1.50.0040.00417.64
8.1.40.0060.00317.69
8.1.30.0000.00817.71
8.1.20.0050.00317.73
8.1.10.0050.00217.75
8.1.00.0080.00017.72
8.0.300.0000.00719.91
8.0.290.0050.00317.15
8.0.280.0050.00318.38
8.0.270.0030.00317.20
8.0.260.0050.00317.03
8.0.250.0040.00417.09
8.0.240.0060.00617.13
8.0.230.0000.00717.04
8.0.220.0000.00717.09
8.0.210.0000.00716.95
8.0.200.0030.00317.01
8.0.190.0040.00417.10
8.0.180.0090.00016.96
8.0.170.0000.00817.03
8.0.160.0000.00816.95
8.0.150.0040.00416.89
8.0.140.0040.00417.01
8.0.130.0060.00013.55
8.0.120.0000.00716.92
8.0.110.0040.00417.03
8.0.100.0040.00416.93
8.0.90.0000.00717.05
8.0.80.0130.01016.98
8.0.70.0040.00416.95
8.0.60.0040.00416.93
8.0.50.0030.00517.09
8.0.30.0090.01317.20
8.0.20.0070.01617.40
8.0.10.0000.00817.17
8.0.00.0080.01116.84
7.4.330.0070.00016.79
7.4.320.0090.00016.73
7.4.300.0030.00316.82
7.4.290.0070.00016.73
7.4.280.0000.00716.76
7.4.270.0040.00416.65
7.4.260.0050.00013.44
7.4.250.0000.00716.68
7.4.240.0030.00316.80
7.4.230.0070.00016.85
7.4.220.0090.01016.87
7.4.210.0060.01016.73
7.4.200.0040.00416.56
7.4.190.0030.00316.79
7.4.160.0080.00816.64
7.4.150.0110.00717.40
7.4.140.0090.00917.86
7.4.130.0120.00616.63
7.4.120.0070.01216.67
7.4.110.0030.01416.66
7.4.100.0070.01016.75
7.4.90.0150.00916.64
7.4.80.0000.01619.39
7.4.70.0080.00816.81
7.4.60.0040.01416.76
7.4.50.0000.00816.68
7.4.40.0030.00922.77
7.4.30.0000.01716.55
7.4.00.0030.01215.33
7.3.330.0050.00013.52
7.3.320.0000.00713.47
7.3.310.0000.00716.37
7.3.300.0070.00016.39
7.3.290.0070.00716.43
7.3.280.0110.00716.44
7.3.270.0070.01017.40
7.3.260.0140.00918.24
7.3.250.0110.00916.73
7.3.240.0140.00316.77
7.3.230.0030.02016.54
7.3.210.0090.00916.51
7.3.200.0160.00619.39
7.3.190.0080.00816.43
7.3.180.0060.01016.72
7.3.170.0130.00316.52
7.3.160.0030.01616.39
7.3.120.0000.01714.75
7.2.330.0140.00316.90
7.2.320.0060.01616.98
7.2.310.0120.00616.70
7.2.300.0070.01016.84
7.2.290.0100.00716.96
7.1.70.0020.00517.50
7.1.60.0070.01719.17
7.1.50.0030.01617.26
7.1.00.0000.03722.38
7.0.200.0000.01217.02
7.0.140.0030.07022.02
7.0.100.0130.04019.87
7.0.90.0100.08319.85
7.0.80.0100.07719.79
7.0.70.0230.04719.84
7.0.60.0100.07719.91
7.0.50.0030.08320.26
7.0.40.0030.09020.00
7.0.30.0100.03720.09
7.0.20.0130.07719.90
7.0.10.0070.07020.02
7.0.00.0070.06319.87
5.6.280.0130.06321.12
5.6.250.0130.07320.68
5.6.240.0030.09020.68
5.6.230.0070.05020.64
5.6.220.0130.06720.62
5.6.210.0070.08720.56
5.6.200.0130.06020.98
5.6.190.0130.04320.89
5.6.180.0100.09021.02
5.6.170.0170.07320.89
5.6.160.0070.08021.05
5.6.150.0070.08720.96
5.6.140.0070.08320.90
5.6.130.0070.07720.89
5.6.120.0030.05721.05
5.6.110.0100.08021.07
5.6.100.0170.07321.05
5.6.90.0030.04320.87
5.6.80.0000.09020.36
5.6.70.0100.07720.35
5.6.60.0030.05320.37
5.6.50.0170.06020.38
5.6.40.0130.07720.31
5.6.30.0070.07720.34
5.6.20.0200.06720.24
5.6.10.0100.07320.32
5.6.00.0070.06320.23
5.5.380.0070.07020.40
5.5.370.0070.04720.31
5.5.360.0100.07020.33
5.5.350.0130.06320.29
5.5.340.0070.07720.87
5.5.330.0100.07020.84
5.5.320.0170.06320.70
5.5.310.0100.08020.85
5.5.300.0030.08020.78
5.5.290.0070.06320.68
5.5.280.0170.08020.60
5.5.270.0100.04720.84
5.5.260.0030.07320.75
5.5.250.0100.07320.64
5.5.240.0070.08320.12
5.5.230.0030.07320.22
5.5.220.0030.09020.20
5.5.210.0100.04720.22
5.5.200.0070.08019.95
5.5.190.0170.07020.18
5.5.180.0100.07320.20
5.5.160.0070.08320.07
5.5.150.0070.06320.06
5.5.140.0030.06720.22
5.5.130.0100.08020.10
5.5.120.0070.06320.22
5.5.110.0100.06720.05
5.5.100.0030.05020.03
5.5.90.0030.07319.93
5.5.80.0100.08020.00
5.5.70.0130.08320.04
5.5.60.0070.05719.91
5.5.50.0070.04720.07
5.5.40.0030.04720.01
5.5.30.0170.03720.00
5.5.20.0100.07020.03
5.5.10.0000.04720.08
5.5.00.0070.08019.91
5.4.450.0070.05719.36
5.4.440.0100.08319.38
5.4.430.0100.07719.50
5.4.420.0100.04719.22
5.4.410.0030.05019.32
5.4.400.0100.03319.23
5.4.390.0070.06019.14
5.4.380.0100.07019.18
5.4.370.0030.07019.04
5.4.360.0000.09019.04
5.4.350.0200.06019.09
5.4.340.0070.07319.02
5.4.320.0070.04319.06
5.4.310.0000.07019.16
5.4.300.0170.06319.04
5.4.290.0130.06719.03
5.4.280.0030.07319.02
5.4.270.0030.09319.04
5.4.260.0030.07719.21
5.4.250.0030.07719.23
5.4.240.0000.07018.86
5.4.230.0070.06319.05
5.4.220.0200.06019.02
5.4.210.0030.07318.84
5.4.200.0070.07018.87
5.4.190.0030.08019.07
5.4.180.0070.07719.12
5.4.170.0130.06019.14
5.4.160.0030.06318.92
5.4.150.0100.07019.13
5.4.140.0030.04316.20
5.4.130.0030.05016.38
5.4.120.0030.07716.34
5.4.110.0170.06716.43
5.4.100.0130.06316.35
5.4.90.0100.04316.27
5.4.80.0000.07716.40
5.4.70.0070.06716.38
5.4.60.0070.07316.46
5.4.50.0070.07316.48
5.4.40.0100.07316.46
5.4.30.0070.07016.33
5.4.20.0030.07716.51
5.4.10.0070.04016.24
5.4.00.0100.07015.72
5.3.290.0170.07314.77
5.3.280.0030.05314.73
5.3.270.0070.07314.57
5.3.260.0070.04014.62
5.3.250.0030.07014.63
5.3.240.0070.03714.66
5.3.230.0070.05714.65
5.3.220.0030.05714.55
5.3.210.0100.07714.65
5.3.200.0000.05714.53
5.3.190.0100.05714.54
5.3.180.0070.07314.68
5.3.170.0070.07014.55
5.3.160.0070.04314.54
5.3.150.0100.07014.55
5.3.140.0070.07714.56
5.3.130.0100.07314.55
5.3.120.0070.07014.61
5.3.110.0100.06714.47
5.3.100.0070.06713.96
5.3.90.0100.06314.15
5.3.80.0030.07714.08
5.3.70.0070.07314.02
5.3.60.0030.05013.95
5.3.50.0070.08014.09
5.3.40.0170.06313.98
5.3.30.0030.05313.97
5.3.20.0000.07313.60
5.3.10.0000.05313.77
5.3.00.0130.06713.70
5.2.170.0000.06711.18
5.2.160.0100.05310.99
5.2.150.0030.04710.96
5.2.140.0100.02711.11
5.2.130.0030.02710.92
5.2.120.0030.04010.92
5.2.110.0000.03711.06
5.2.100.0030.06311.09
5.2.90.0000.04711.18
5.2.80.0070.05711.06
5.2.70.0070.06711.09
5.2.60.0070.05311.12
5.2.50.0070.04010.94
5.2.40.0030.05710.97
5.2.30.0070.06310.97
5.2.20.0100.06010.88
5.2.10.0000.06710.91
5.2.00.0030.05310.65
5.1.60.0100.0439.98
5.1.50.0030.0439.88
5.1.40.0000.0609.82
5.1.30.0070.04310.20
5.1.20.0000.03710.40
5.1.10.0030.04310.14
5.1.00.0000.06010.14
5.0.50.0030.0478.60
5.0.40.0030.0378.41
5.0.30.0100.0508.26
5.0.20.0000.0278.27
5.0.10.0070.0338.04
5.0.00.0000.0438.26
4.4.90.0000.0338.04
4.4.80.0000.0238.04
4.4.70.0100.0308.04
4.4.60.0070.0308.04
4.4.50.0030.0408.04
4.4.40.0070.0378.04
4.4.30.0000.0308.04
4.4.20.0000.0338.04
4.4.10.0000.0408.04
4.4.00.0000.0308.04
4.3.110.0030.0178.04
4.3.100.0030.0338.04
4.3.90.0000.0338.04
4.3.80.0030.0378.04
4.3.70.0000.0208.04
4.3.60.0030.0338.04
4.3.50.0030.0338.04
4.3.40.0030.0438.04
4.3.30.0000.0408.04
4.3.20.0100.0308.04
4.3.10.0000.0338.04
4.3.00.0000.0308.04

preferences:
47.44 ms | 401 KiB | 5 Q