3v4l.org

run code in 300+ PHP versions simultaneously
<?php function clean($string) { return preg_replace('/[^A-Za-z0-9.\/\-_~]/', '', $string); } $toClean = ' abcDEF123./-_~àéèùïî% *\@& '; var_dump($toClean); var_dump(clean($toClean));

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.0110.00418.68
8.3.50.0150.00316.80
8.3.40.0140.00318.70
8.3.30.0120.00318.68
8.3.20.0060.00320.18
8.3.10.0040.00423.46
8.3.00.0040.00419.67
8.2.180.0030.01418.41
8.2.170.0150.00022.96
8.2.160.0100.00319.04
8.2.150.0050.00224.18
8.2.140.0080.00024.66
8.2.130.0070.00019.45
8.2.120.0040.00426.35
8.2.110.0060.00319.14
8.2.100.0060.00617.84
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0050.00317.88
8.2.60.0040.00417.80
8.2.50.0000.01218.10
8.2.40.0000.00720.60
8.2.30.0000.00719.27
8.2.20.0040.00418.06
8.2.10.0040.00418.07
8.2.00.0050.00317.88
8.1.280.0100.01025.92
8.1.270.0040.00422.14
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00421.86
8.1.230.0040.00720.88
8.1.220.0030.00617.74
8.1.210.0050.00318.77
8.1.200.0070.00317.36
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0050.00318.69
8.1.160.0000.00719.02
8.1.150.0040.00418.77
8.1.140.0040.00419.45
8.1.130.0040.00418.89
8.1.120.0000.00817.59
8.1.110.0040.00417.50
8.1.100.0040.00417.54
8.1.90.0040.00417.48
8.1.80.0030.00317.57
8.1.70.0040.00417.54
8.1.60.0080.00017.71
8.1.50.0030.00517.55
8.1.40.0060.00617.64
8.1.30.0040.00417.78
8.1.20.0000.00917.80
8.1.10.0040.00417.52
8.1.00.0060.00317.41
8.0.300.0000.00720.09
8.0.290.0030.00616.75
8.0.280.0000.00718.31
8.0.270.0030.00317.22
8.0.260.0030.00316.83
8.0.250.0030.00317.00
8.0.240.0030.00616.93
8.0.230.0030.00316.96
8.0.220.0000.00716.84
8.0.210.0000.00716.99
8.0.200.0030.00316.93
8.0.190.0030.00617.01
8.0.180.0000.00716.82
8.0.170.0060.00316.88
8.0.160.0030.00616.94
8.0.150.0070.00016.88
8.0.140.0030.00516.91
8.0.130.0000.00613.43
8.0.120.0040.00416.96
8.0.110.0000.00716.82
8.0.100.0040.00416.74
8.0.90.0000.00817.00
8.0.80.0160.00016.97
8.0.70.0070.00016.74
8.0.60.0080.00016.92
8.0.50.0030.00516.95
8.0.30.0100.00717.10
8.0.20.0170.01017.40
8.0.10.0040.00417.02
8.0.00.0120.00616.69
7.4.330.0050.00015.55
7.4.320.0040.00416.59
7.4.300.0030.00316.71
7.4.290.0040.00416.70
7.4.280.0050.00316.69
7.4.270.0030.00316.82
7.4.260.0030.00716.67
7.4.250.0000.00716.68
7.4.240.0050.00316.71
7.4.230.0000.00716.61
7.4.220.0110.00816.76
7.4.210.0160.00616.71
7.4.200.0000.00716.71
7.4.160.0130.00316.71
7.4.150.0140.00617.40
7.4.140.0080.01317.86
7.4.130.0070.01516.61
7.4.120.0120.00716.73
7.4.110.0090.01516.63
7.4.100.0060.01516.68
7.4.90.0120.00616.75
7.4.80.0070.01019.39
7.4.70.0070.01016.65
7.4.60.0040.01116.83
7.4.50.0110.00716.75
7.4.40.0120.00316.73
7.4.30.0060.01116.39
7.4.00.0070.01014.90
7.3.330.0000.00513.23
7.3.320.0000.00513.10
7.3.310.0000.00716.41
7.3.300.0070.00016.39
7.3.290.0020.01416.36
7.3.280.0110.00616.37
7.3.270.0040.01317.40
7.3.260.0090.01116.64
7.3.250.0070.01016.40
7.3.240.0070.00916.53
7.3.230.0070.01116.75
7.3.210.0080.00816.67
7.3.200.0130.00916.41
7.3.190.0130.00316.55
7.3.180.0090.00616.31
7.3.170.0160.00016.80
7.3.160.0090.00916.36
7.2.330.0090.00916.61
7.2.320.0100.00716.63
7.2.310.0110.00716.64
7.2.300.0060.01016.68
7.2.290.0040.01316.66
7.2.60.0120.00316.92
7.2.00.0040.00819.40
7.1.200.0140.00315.46
7.1.100.0100.00317.75
7.1.70.0100.00517.34
7.1.60.0290.00435.26
7.1.50.0210.01635.02
7.1.40.0150.01434.69
7.1.30.0230.00634.68
7.1.20.0190.02434.66
7.1.10.0060.01216.78
7.1.00.0110.00816.77
7.0.200.0090.00916.77
7.0.190.0030.01417.00
7.0.180.0010.01616.40
7.0.170.0100.00716.27
7.0.160.0120.00816.31
7.0.150.0030.01216.42
7.0.140.0100.00616.63
7.0.130.0670.01216.51
7.0.120.0620.01216.77
7.0.110.0510.01316.55
7.0.100.0590.01316.37
7.0.90.0800.00716.38
7.0.80.0050.01316.49
7.0.70.0660.00914.54
7.0.60.0050.01416.08
7.0.50.0060.00916.39
7.0.40.0090.00616.80
7.0.30.0040.01116.51
7.0.20.0070.00916.32
7.0.10.0030.01216.60
7.0.00.0120.00316.45

preferences:
45.62 ms | 401 KiB | 5 Q