3v4l.org

run code in 300+ PHP versions simultaneously
<?php $temp = " hello th*ere-----------how are you--au!@&*--"; //$temp = strtolower($temp); //$temp = preg_replace('/\s+/',' ', $temp); $temp = preg_replace('/\s+/', '-', $temp); $temp = preg_replace('/[\-]+[^\w-]/', '', $temp); //$temp = trim($temp); //$temp = preg_replace('/\s+/', '-', $temp); echo($temp);

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.0180.00016.50
8.3.50.0130.00821.21
8.3.40.0110.00718.84
8.3.30.0190.00018.96
8.3.20.0040.00420.16
8.3.10.0050.00221.79
8.3.00.0050.00319.66
8.2.180.0140.00718.41
8.2.170.0070.00719.14
8.2.160.0140.00022.96
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0070.00726.16
8.2.120.0040.00422.03
8.2.110.0050.00322.32
8.2.100.0040.00719.76
8.2.90.0000.00919.09
8.2.80.0050.00317.97
8.2.70.0000.00817.73
8.2.60.0040.00417.93
8.2.50.0070.00418.07
8.2.40.0040.00419.94
8.2.30.0040.00418.33
8.2.20.0050.00217.84
8.2.10.0070.00018.18
8.2.00.0000.00818.14
8.1.280.0040.01125.92
8.1.270.0040.00420.38
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.79
8.1.230.0040.00819.16
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0000.00917.36
8.1.180.0090.00019.13
8.1.170.0000.00818.71
8.1.160.0000.00821.98
8.1.150.0040.00418.73
8.1.140.0000.00717.57
8.1.130.0030.00317.72
8.1.120.0080.00317.47
8.1.110.0050.00317.59
8.1.100.0000.00717.57
8.1.90.0000.00717.56
8.1.80.0050.00217.55
8.1.70.0000.00717.44
8.1.60.0040.00717.61
8.1.50.0000.00917.57
8.1.40.0080.00017.62
8.1.30.0040.00417.68
8.1.20.0050.00317.64
8.1.10.0000.00817.72
8.1.00.0000.00717.62
8.0.300.0040.00418.77
8.0.290.0040.00416.93
8.0.280.0070.00018.45
8.0.270.0000.00717.14
8.0.260.0000.00617.11
8.0.250.0060.00017.11
8.0.240.0050.00316.99
8.0.230.0070.00016.86
8.0.220.0000.00716.86
8.0.210.0000.00716.83
8.0.200.0000.00616.89
8.0.190.0050.00317.09
8.0.180.0000.00917.01
8.0.170.0040.00417.01
8.0.160.0000.00816.84
8.0.150.0070.00016.95
8.0.140.0000.00716.82
8.0.130.0030.00313.42
8.0.120.0000.00916.83
8.0.110.0000.00816.90
8.0.100.0030.00516.79
8.0.90.0080.00017.04
8.0.80.0120.00916.99
8.0.70.0040.00416.97
8.0.60.0040.00416.96
8.0.50.0050.00217.03
8.0.30.0130.00517.15
8.0.20.0130.00517.40
8.0.10.0000.00717.01
8.0.00.0130.00516.90
7.4.330.0000.00515.03
7.4.320.0030.00316.74
7.4.300.0030.00316.64
7.4.290.0030.00316.79
7.4.280.0040.00416.74
7.4.270.0030.00316.64
7.4.260.0030.00316.73
7.4.250.0070.00016.63
7.4.240.0030.00516.74
7.4.230.0030.00316.66
7.4.220.0070.01116.61
7.4.210.0030.01716.83
7.4.200.0000.00716.68
7.4.160.0150.00316.77
7.4.150.0150.00317.40
7.4.140.0100.01217.86
7.4.130.0110.00716.79
7.4.120.0100.01116.57
7.4.110.0100.00716.71
7.4.100.0080.01616.59
7.4.90.0060.01016.58
7.4.80.0030.01919.39
7.4.70.0060.01216.72
7.4.60.0050.01016.52
7.4.50.0000.00716.68
7.4.40.0130.00316.77
7.4.30.0080.00916.57
7.4.00.0070.01015.15
7.3.330.0060.00013.25
7.3.320.0050.00013.13
7.3.310.0040.00416.38
7.3.300.0000.00816.20
7.3.290.0100.00416.34
7.3.280.0080.00816.33
7.3.270.0140.01017.40
7.3.260.0100.00716.56
7.3.250.0110.00616.63
7.3.240.0120.00816.40
7.3.230.0160.00616.44
7.3.210.0110.00716.73
7.3.200.0090.00616.65
7.3.190.0040.01216.43
7.3.180.0040.01416.28
7.3.170.0170.00716.37
7.3.160.0080.00816.34
7.2.330.0090.00916.61
7.2.320.0100.00616.50
7.2.310.0070.01316.52
7.2.300.0090.01016.88
7.2.290.0090.01316.65
7.2.60.0080.00617.16
7.2.00.0000.01219.25
7.1.200.0040.01115.93
7.1.100.0070.00318.56
7.1.70.0030.00617.46
7.1.60.0030.01019.86
7.1.50.0070.01817.12
7.1.00.0000.08022.36
7.0.200.0150.00716.07
7.0.60.0200.05719.94
7.0.50.0100.07017.89
7.0.40.0070.04019.91
7.0.30.0200.08020.02
7.0.20.0330.04720.20
7.0.10.0030.08720.10
7.0.00.0130.07720.10
5.6.280.0070.06721.09
5.6.210.0100.08320.68
5.6.200.0030.04018.18
5.6.190.0070.08720.27
5.6.180.0400.03720.64
5.6.170.0170.04320.38
5.6.160.0100.08720.43
5.6.150.0070.05318.14
5.6.140.0000.04018.14
5.6.130.0000.05718.17
5.6.120.0070.06721.11
5.6.110.0030.04020.97
5.6.100.0170.05721.08
5.6.90.0170.05721.11
5.6.80.0230.06020.35
5.5.350.0270.07320.39
5.5.340.0130.06317.98
5.5.330.0200.07020.13
5.5.320.0100.07720.26
5.5.310.0200.08020.29
5.5.300.0070.07718.00
5.5.290.0100.06018.02
5.5.280.0070.05020.64
5.5.270.0070.03720.64
5.5.260.0000.04320.75
5.5.250.0200.06720.48
5.5.240.0030.07020.36
5.4.450.0570.07319.13
5.4.440.0270.04719.32
5.4.430.0170.04719.30
5.4.420.0230.06719.54
5.4.410.0230.06319.42
5.4.400.0130.07019.19
5.4.390.0200.06319.02
5.4.380.0200.06719.11
5.4.370.0130.07019.04
5.4.360.0170.06319.02
5.4.350.0100.07719.06
5.4.340.0070.06019.13
5.4.320.0100.05319.00
5.4.310.0130.05019.14
5.4.300.0200.06718.99
5.4.290.0130.05719.03
5.4.280.0230.05718.87
5.4.270.0130.05318.93
5.4.260.0030.05719.25
5.4.250.0070.06019.05
5.4.240.0230.04318.91
5.4.230.0030.05719.15
5.4.220.0170.04718.93
5.4.210.0130.05019.03
5.4.200.0170.04316.71
5.4.190.0100.05018.97
5.4.180.0130.05018.92
5.4.170.0070.05719.02
5.4.160.0030.07719.02
5.4.150.0170.05719.09
5.4.140.0130.04716.23
5.4.130.0130.04316.16
5.4.120.0100.05016.50
5.4.110.0030.05716.39
5.4.100.0130.04716.39
5.4.90.0070.05316.38
5.4.80.0100.05016.10
5.4.70.0030.05716.06
5.4.60.0070.05016.21
5.4.50.0170.04316.30
5.4.40.0070.07316.06
5.4.30.0100.06716.29
5.4.20.0170.06716.06
5.4.10.0100.06716.14
5.4.00.0170.05715.96
5.3.290.0170.08314.64
5.3.280.0030.05714.50
5.3.270.0070.05714.54
5.3.260.0100.06014.63
5.3.250.0200.06014.45
5.3.240.0100.05014.51
5.3.230.0170.04314.47
5.3.220.0200.04714.54
5.3.210.0100.05714.57
5.3.200.0030.05714.41
5.3.190.0070.05314.43
5.3.180.0170.04014.45
5.3.170.0130.04314.50
5.3.160.0170.06314.39
5.3.150.0130.05314.48
5.3.140.0100.07014.45
5.3.130.0070.06314.57
5.3.120.0200.06014.42
5.3.110.0070.06014.50
5.3.100.0030.05714.05
5.3.90.0100.04713.93
5.3.80.0100.05013.81
5.3.70.0100.04713.84
5.3.60.0130.04713.86
5.3.50.0070.05013.82
5.3.40.0000.06713.81
5.3.30.0070.06013.74
5.3.20.0070.05013.62
5.3.10.0030.05313.52
5.3.00.0030.05313.48
5.2.170.0070.04011.06
5.2.160.0030.04310.98
5.2.150.0030.04310.99
5.2.140.0070.06011.13
5.2.130.0070.05711.02
5.2.120.0030.04011.05
5.2.110.0030.04311.02
5.2.100.0070.04010.95
5.2.90.0100.03710.98
5.2.80.0030.04711.17
5.2.70.0130.03310.98
5.2.60.0100.04010.99
5.2.50.0030.04710.85
5.2.40.0000.04711.07
5.2.30.0070.04010.91
5.2.20.0130.03710.84
5.2.10.0070.04010.79
5.2.00.0070.04710.63
5.1.60.0130.0279.87
5.1.50.0100.0309.93
5.1.40.0030.0379.88
5.1.30.0070.03710.23
5.1.20.0000.04310.32
5.1.10.0030.0409.91
5.1.00.0100.0309.96
5.0.50.0000.0378.57
5.0.40.0070.0278.48
5.0.30.0000.0638.10
5.0.20.0070.0378.25
5.0.10.0130.0308.27
5.0.00.0070.0538.14
4.4.90.0100.0235.91
4.4.80.0000.0275.79
4.4.70.0000.0275.72
4.4.60.0100.0235.81
4.4.50.0130.0205.77
4.4.40.0100.0335.72
4.4.30.0070.0235.77
4.4.20.0070.0275.85
4.4.10.0170.0175.81
4.4.00.0030.0335.79
4.3.110.0070.0235.79
4.3.100.0030.0205.78
4.3.90.0000.0235.68
4.3.80.0070.0305.66
4.3.70.0000.0235.64
4.3.60.0070.0175.65
4.3.50.0000.0275.65
4.3.40.0030.0335.72
4.3.30.0000.0234.50
4.3.20.0030.0204.39
4.3.10.0000.0234.38
4.3.00.0170.0137.27

preferences:
49.97 ms | 401 KiB | 5 Q