3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = ", , GUWAHATI, TEZPUR, , BAMUNI HILLS, MAHABHAIRAB TEMPLE, AGNIGARH , "; echo preg_replace('/\s*(?:,\s*)+/', ', ', trim($string, ", \n\r\t\v\x00"));

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.4.120.0100.01020.51
8.4.110.0110.00922.45
8.4.100.0060.00417.65
8.4.90.0110.00918.74
8.4.80.0050.00517.88
8.4.70.0040.01017.88
8.4.60.0150.00518.77
8.4.50.0120.00919.63
8.4.40.0130.00619.89
8.4.30.0130.00618.43
8.4.20.0160.00318.11
8.4.10.0000.00923.79
8.3.250.0080.01118.69
8.3.240.0150.00516.86
8.3.230.0080.01216.68
8.3.220.0100.00817.00
8.3.210.0110.00716.73
8.3.200.0050.00416.75
8.3.190.0040.00418.92
8.3.180.0060.00416.31
8.3.170.0100.01018.70
8.3.160.0000.01916.54
8.3.150.0110.00720.59
8.3.140.0040.00418.29
8.3.130.0060.00318.69
8.3.120.0000.00820.61
8.3.110.0060.00918.56
8.3.100.0050.00316.79
8.3.90.0050.00316.47
8.3.80.0060.00318.55
8.3.70.0080.00816.63
8.3.60.0120.00316.75
8.3.50.0070.01120.14
8.3.40.0030.01022.11
8.3.30.0100.00618.83
8.3.20.0000.01124.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0090.01020.38
8.2.280.0050.00418.66
8.2.270.0110.00317.20
8.2.260.0140.00420.36
8.2.250.0030.00618.52
8.2.240.0000.00916.91
8.2.230.0090.00020.94
8.2.220.0090.00024.06
8.2.210.0030.00726.77
8.2.200.0060.00318.41
8.2.190.0110.00718.17
8.2.180.0060.00925.92
8.2.170.0040.01118.95
8.2.160.0090.00622.96
8.2.150.0050.00225.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00021.16
8.2.110.0110.00020.38
8.2.100.0060.00617.85
8.2.90.0060.00318.16
8.2.80.0040.00417.97
8.2.70.0030.00717.88
8.2.60.0080.00017.80
8.2.50.0080.00318.07
8.2.40.0000.00917.96
8.2.30.0050.00318.13
8.2.20.0080.00019.27
8.2.10.0090.00018.02
8.2.00.0000.00719.07
8.1.330.0170.00221.77
8.1.320.0070.01216.09
8.1.310.0130.00316.79
8.1.300.0090.00616.20
8.1.290.0090.00030.84
8.1.280.0150.00325.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.03
8.1.230.0060.00620.97
8.1.220.0040.00417.74
8.1.210.0060.00318.91
8.1.200.0000.00917.35
8.1.190.0040.00417.41
8.1.180.0040.00418.10
8.1.170.0000.00918.71
8.1.160.0050.00318.83
8.1.150.0050.00218.71
8.1.140.0040.00417.44
8.1.130.0040.00420.64
8.1.120.0040.00417.61
8.1.110.0100.00817.50
8.1.100.0040.00417.57
8.1.90.0100.00717.51
8.1.80.0080.00817.55
8.1.70.0100.00717.47
8.1.60.0090.00617.47
8.1.50.0190.00017.50
8.1.40.0170.00017.45
8.1.30.0070.00717.57
8.1.20.0100.00817.70
8.1.10.0170.00317.66
8.1.00.0160.00417.60
8.0.300.0030.00320.16
8.0.290.0000.00717.18
8.0.280.0070.00018.47
8.0.270.0070.00017.27
8.0.260.0000.00618.47
8.0.250.0050.01017.13
8.0.240.0000.01717.03
8.0.230.0070.00816.95
8.0.220.0110.00516.95
8.0.210.0080.00816.95
8.0.200.0120.00317.03
8.0.190.0130.00317.03
8.0.180.0120.00416.97
8.0.170.0090.00516.96
8.0.160.0120.00316.82
8.0.150.0100.00616.88
8.0.140.0080.00716.89
8.0.130.0130.00416.71
8.0.120.0130.00316.98
8.0.110.0090.00616.84
8.0.100.0090.00616.93
8.0.90.0160.00016.76
8.0.80.0150.00016.83
8.0.70.0080.00516.91
8.0.60.0120.00016.95
8.0.50.0000.00916.89
8.0.30.0090.00516.93
8.0.20.0160.00016.98
8.0.10.0090.00317.06
7.4.330.0000.00515.55
7.4.320.0070.00316.60
7.4.300.0060.00216.73
7.4.290.0130.00616.66
7.4.280.0130.00016.65
7.4.270.0080.00816.55
7.4.260.0110.00616.72
7.4.250.0090.00316.77
7.4.240.0140.00016.77
7.4.230.0090.00616.59
7.4.220.0090.00616.59
7.4.210.0140.00316.74
7.4.200.0120.00016.60
7.4.190.0120.00316.71
7.4.180.0040.00816.66
7.4.160.0050.00516.13
7.4.150.0040.00816.39
7.4.140.0080.00516.55
7.4.130.0060.00616.51
7.4.120.0080.00816.52
7.4.110.0130.00216.48
7.4.100.0050.01016.72
7.4.90.0040.00916.49
7.4.80.0040.00816.59
7.4.70.0100.00416.71
7.4.60.0080.00416.59
7.4.50.0090.00316.26
7.4.40.0070.00716.55
7.4.30.0110.00316.67
7.4.20.0100.00416.60
7.4.10.0120.00016.66
7.4.00.0000.01616.44

preferences:
27.76 ms | 403 KiB | 5 Q