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.0100.00716.63
8.3.50.0110.00721.29
8.3.40.0040.01118.70
8.3.30.0070.00719.04
8.3.20.0000.00720.18
8.3.10.0040.00423.52
8.3.00.0080.00019.56
8.2.180.0090.01218.42
8.2.170.0070.00718.95
8.2.160.0100.00322.96
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0030.00622.24
8.2.110.0040.00422.27
8.2.100.0080.00419.83
8.2.90.0040.00419.22
8.2.80.0090.00017.97
8.2.70.0000.00917.63
8.2.60.0040.00417.80
8.2.50.0000.00918.07
8.2.40.0000.00819.88
8.2.30.0050.00218.19
8.2.20.0050.00317.74
8.2.10.0040.00418.13
8.2.00.0000.00818.18
8.1.280.0160.00025.92
8.1.270.0050.00320.09
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0030.00623.96
8.1.230.0090.00319.09
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0000.00917.48
8.1.190.0030.00617.22
8.1.180.0060.00319.14
8.1.170.0000.00918.61
8.1.160.0040.00421.96
8.1.150.0070.00018.64
8.1.140.0070.00017.48
8.1.130.0070.00017.85
8.1.120.0070.00317.51
8.1.110.0000.00817.56
8.1.100.0000.00917.60
8.1.90.0000.00717.60
8.1.80.0070.00017.55
8.1.70.0080.00017.49
8.1.60.0030.00517.65
8.1.50.0000.00817.56
8.1.40.0060.00317.64
8.1.30.0030.00517.63
8.1.20.0000.00817.72
8.1.10.0080.00017.68
8.1.00.0040.00417.56
8.0.300.0050.00218.77
8.0.290.0060.00317.05
8.0.280.0040.00418.45
8.0.270.0030.00317.28
8.0.260.0000.00617.16
8.0.250.0030.00317.04
8.0.240.0000.00717.00
8.0.230.0000.00817.00
8.0.220.0000.00716.98
8.0.210.0080.00016.91
8.0.200.0060.00017.05
8.0.190.0040.00417.06
8.0.180.0080.00416.86
8.0.170.0040.00416.97
8.0.160.0030.00516.88
8.0.150.0080.00016.85
8.0.140.0060.00316.92
8.0.130.0060.00013.36
8.0.120.0080.00016.81
8.0.110.0000.00717.01
8.0.100.0080.00017.04
8.0.90.0030.00516.85
8.0.80.0060.01016.99
8.0.70.0000.00716.86
8.0.60.0000.00716.95
8.0.50.0040.00416.85
8.0.30.0120.00617.07
8.0.20.0120.00817.40
8.0.10.0040.00416.95
8.0.00.0050.01216.88
7.4.330.0020.00215.03
7.4.320.0060.00016.80
7.4.300.0040.00416.75
7.4.290.0070.00016.66
7.4.280.0030.00516.74
7.4.270.0000.00716.72
7.4.260.0040.00416.67
7.4.250.0030.00516.60
7.4.240.0020.00516.68
7.4.230.0070.00016.84
7.4.220.0100.00916.69
7.4.210.0100.00616.68
7.4.200.0040.00316.81
7.4.160.0140.00316.51
7.4.150.0150.00917.40
7.4.140.0100.01217.86
7.4.130.0140.00616.58
7.4.120.0090.00916.60
7.4.110.0060.01216.79
7.4.100.0060.01316.44
7.4.90.0090.00916.73
7.4.80.0150.00319.39
7.4.70.0100.00716.60
7.4.60.0060.01016.38
7.4.50.0000.00916.47
7.4.40.0120.00316.71
7.4.30.0090.01216.51
7.4.00.0060.00915.00
7.3.330.0030.00313.19
7.3.320.0030.00313.17
7.3.310.0030.00316.37
7.3.300.0070.00016.25
7.3.290.0070.00916.36
7.3.280.0110.00516.33
7.3.270.0060.01317.40
7.3.260.0060.01216.34
7.3.250.0080.00916.45
7.3.240.0060.01116.39
7.3.230.0100.01316.39
7.3.210.0100.00716.68
7.3.200.0100.00716.58
7.3.190.0110.00816.45
7.3.180.0100.00716.74
7.3.170.0060.01116.66
7.3.160.0100.00716.45
7.2.330.0090.01116.68
7.2.320.0030.01416.85
7.2.310.0090.00616.66
7.2.300.0060.01016.75
7.2.290.0090.00916.67
7.2.60.0030.01016.96
7.2.00.0070.00719.61
7.1.100.0000.01118.08
7.1.70.0040.00817.40
7.1.60.0000.01519.86
7.1.50.0060.01917.16
7.1.00.0070.07322.25
7.0.200.0080.00015.05
7.0.60.0000.04319.92
7.0.50.0000.08017.90
7.0.40.0000.06720.29
7.0.30.0500.04320.35
7.0.20.0230.03320.00
7.0.10.0100.08020.22
7.0.00.0070.05720.10
5.6.280.0100.06720.90
5.6.210.0130.08020.66
5.6.200.0100.08018.14
5.6.190.0170.07320.67
5.6.180.0470.06720.77
5.6.170.0200.03720.38
5.6.160.0100.06020.37
5.6.150.0030.06018.08
5.6.140.0070.08018.21
5.6.130.0000.09018.20
5.6.120.0070.07020.98
5.6.110.0070.03720.97
5.6.100.0100.08021.06
5.6.90.0170.05020.96
5.6.80.0070.05720.38
5.5.350.0130.03320.39
5.5.340.0030.08317.91
5.5.330.0030.09020.19
5.5.320.0030.05720.30
5.5.310.0330.08020.24
5.5.300.0000.08317.91
5.5.290.0030.05717.91
5.5.280.0100.06320.73
5.5.270.0000.04720.82
5.5.260.0070.04020.86
5.5.250.0070.08020.65
5.5.240.0070.07320.25
5.4.450.0570.06319.24
5.4.440.0170.06019.45
5.4.430.0100.05319.34
5.4.420.0130.05319.24
5.4.410.0100.05719.31
5.4.400.0070.05719.24
5.4.390.0100.05719.09
5.4.380.0100.05319.02
5.4.370.0030.05719.18
5.4.360.0070.05318.98
5.4.350.0130.05018.94
5.4.340.0100.05319.16
5.4.320.0030.06718.94
5.4.310.0200.04319.04
5.4.300.0000.06018.97
5.4.290.0100.05019.15
5.4.280.0100.05019.14
5.4.270.0100.05019.14
5.4.260.0070.05319.14
5.4.250.0100.05319.14
5.4.240.0000.06319.03
5.4.230.0100.05019.00
5.4.220.0070.05719.05
5.4.210.0070.05319.11
5.4.200.0070.05316.93
5.4.190.0130.04718.93
5.4.180.0000.06019.02
5.4.170.0130.04719.11
5.4.160.0100.05019.01
5.4.150.0170.04319.03
5.4.140.0070.05716.20
5.4.130.0030.05316.34
5.4.120.0100.06016.38
5.4.110.0130.04716.32
5.4.100.0030.05716.37
5.4.90.0070.05316.42
5.4.80.0030.05316.21
5.4.70.0030.05316.52
5.4.60.0130.04316.32
5.4.50.0070.05016.16
5.4.40.0000.06716.48
5.4.30.0030.05316.51
5.4.20.0100.05016.15
5.4.10.0030.05016.29
5.4.00.0130.04715.96
5.3.290.0100.05314.66
5.3.280.0100.04714.52
5.3.270.0000.06014.60
5.3.260.0100.05014.62
5.3.250.0030.05714.47
5.3.240.0070.07314.58
5.3.230.0000.06314.67
5.3.220.0130.07014.49
5.3.210.0030.06014.46
5.3.200.0200.06314.61
5.3.190.0100.07014.55
5.3.180.0130.05314.56
5.3.170.0170.04014.54
5.3.160.0170.04014.47
5.3.150.0170.04314.48
5.3.140.0170.04314.53
5.3.130.0100.05014.48
5.3.120.0000.06314.62
5.3.110.0000.06014.64
5.3.100.0030.05314.10
5.3.90.0130.05013.91
5.3.80.0070.05713.92
5.3.70.0070.05313.91
5.3.60.0130.04713.92
5.3.50.0100.04714.02
5.3.40.0130.05013.95
5.3.30.0030.05713.76
5.3.20.0000.05713.77
5.3.10.0070.06713.60
5.3.00.0170.04013.73
5.2.170.0000.04711.13
5.2.160.0000.04711.15
5.2.150.0000.05311.25
5.2.140.0130.03311.08
5.2.130.0100.05011.21
5.2.120.0070.03711.06
5.2.110.0030.04711.01
5.2.100.0100.03711.06
5.2.90.0130.03011.20
5.2.80.0030.04711.07
5.2.70.0030.05011.04
5.2.60.0100.04711.04
5.2.50.0030.04011.08
5.2.40.0070.03711.00
5.2.30.0100.03711.09
5.2.20.0030.04310.95
5.2.10.0000.04310.80
5.2.00.0070.04010.78
5.1.60.0000.03710.07
5.1.50.0000.03710.08
5.1.40.0130.0279.97
5.1.30.0070.03310.36
5.1.20.0100.03710.29
5.1.10.0000.0379.96
5.1.00.0070.03310.05
5.0.50.0070.0278.45
5.0.40.0030.0338.48
5.0.30.0030.0478.30
5.0.20.0000.0308.12
5.0.10.0030.0338.08
5.0.00.0030.0508.09
4.4.90.0030.0205.93
4.4.80.0000.0235.91
4.4.70.0030.0205.90
4.4.60.0000.0235.90
4.4.50.0030.0205.89
4.4.40.0000.0405.79
4.4.30.0030.0205.85
4.4.20.0030.0205.95
4.4.10.0000.0235.91
4.4.00.0030.0335.79
4.3.110.0000.0275.79
4.3.100.0000.0235.74
4.3.90.0030.0205.80
4.3.80.0030.0335.77
4.3.70.0030.0205.63
4.3.60.0030.0205.82
4.3.50.0000.0235.80
4.3.40.0070.0305.69
4.3.30.0070.0174.53
4.3.20.0000.0234.50
4.3.10.0070.0174.38
4.3.00.0130.0207.27

preferences:
57.53 ms | 401 KiB | 5 Q