3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sanitizeFilename(string $name): string { return preg_replace( ['/ +/', '/\W+/'], ['_', ''], $name ); } echo sanitizeFilename('This/has a Gap !n 1t');

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.5.00.0110.01120.11
8.4.150.0020.00014.05
8.4.140.0120.00917.63
8.4.130.0110.01017.66
8.4.120.0120.00820.84
8.4.110.0150.00518.90
8.4.100.0060.00317.89
8.4.90.0080.01320.65
8.4.80.0130.00820.95
8.4.70.0060.00718.84
8.4.60.0090.00620.82
8.4.50.0120.00918.00
8.4.40.0120.00319.54
8.4.30.0100.00720.66
8.4.20.0000.00917.77
8.4.10.0090.00620.35
8.3.280.0090.01118.64
8.3.270.0090.01316.75
8.3.260.0120.00716.61
8.3.250.0110.00818.93
8.3.240.0130.00716.63
8.3.230.0100.00916.54
8.3.220.0150.00418.91
8.3.210.0120.00516.57
8.3.200.0040.00416.56
8.3.190.0020.00717.17
8.3.180.0160.00620.75
8.3.170.0110.00716.66
8.3.160.0070.01016.71
8.3.150.0150.00317.10
8.3.140.0070.01116.56
8.3.130.0030.00618.38
8.3.120.0060.00320.61
8.3.110.0040.00418.31
8.3.100.0090.00016.67
8.3.90.0040.00426.77
8.3.80.0090.00016.50
8.3.70.0100.01016.58
8.3.60.0080.00818.68
8.3.50.0140.00720.20
8.3.40.0090.01218.97
8.3.30.0000.01419.17
8.3.20.0040.01123.04
8.3.10.0090.00523.16
8.3.00.0070.00822.62
8.2.290.0100.00816.80
8.2.280.0070.00118.65
8.2.270.0150.00416.99
8.2.260.0070.00018.61
8.2.250.0080.00017.16
8.2.240.0070.01317.06
8.2.230.0060.00320.94
8.2.220.0090.00624.06
8.2.210.0100.00026.77
8.2.200.0040.00416.88
8.2.190.0140.00416.63
8.2.180.0060.01225.92
8.2.170.0120.00322.96
8.2.160.0100.01022.96
8.2.150.0070.00722.32
8.2.140.0070.00722.55
8.2.130.0090.00523.38
8.2.120.0110.00319.44
8.2.110.0120.00320.67
8.2.100.0090.00718.50
8.2.90.0090.00618.39
8.2.80.0040.01118.68
8.2.70.0070.00618.36
8.2.60.0090.00518.41
8.2.50.0100.00518.61
8.2.40.0070.00718.52
8.2.30.0030.01018.50
8.2.20.0080.00519.64
8.2.10.0060.00818.23
8.2.00.0120.00018.99
8.1.330.0120.00716.30
8.1.320.0110.00719.79
8.1.310.0070.01116.64
8.1.300.0180.00316.52
8.1.290.0060.00330.84
8.1.280.0100.00325.92
8.1.270.0060.00823.09
8.1.260.0060.00525.04
8.1.250.0100.00425.09
8.1.240.0070.00721.10
8.1.230.0050.01019.77
8.1.220.0040.00718.24
8.1.210.0080.00518.70
8.1.200.0060.00617.88
8.1.190.0040.00817.74
8.1.180.0070.00818.23
8.1.170.0070.00518.74
8.1.160.0070.00718.71
8.1.150.0080.00518.72
8.1.140.0070.00517.97
8.1.130.0070.00718.69
8.1.120.0020.01018.07
8.1.110.0090.00318.02
8.1.100.0080.00318.05
8.1.90.0050.00717.99
8.1.80.0050.00718.55
8.1.70.0070.00518.01
8.1.60.0070.00518.24
8.1.50.0090.00418.11
8.1.40.0070.00418.11
8.1.30.0080.00618.28
8.1.20.0110.00218.87
8.1.10.0070.00718.11
8.1.00.0130.00018.09
8.0.300.0070.00318.99
8.0.290.0080.00717.27
8.0.280.0130.00318.15
8.0.270.0080.00317.39
8.0.260.0150.00518.16
8.0.250.0130.00717.53
8.0.240.0110.00617.50
8.0.230.0090.00517.46
8.0.220.0120.00517.37
8.0.210.0100.00717.40
8.0.200.0120.00517.43
8.0.190.0150.00417.29
8.0.180.0130.00517.39
8.0.170.0140.00617.41
8.0.160.0050.00817.42
8.0.150.0200.00317.23
8.0.140.0200.00317.39
8.0.130.0190.00417.39
8.0.120.0150.00817.29
8.0.110.0090.00317.36
8.0.100.0120.00417.27
8.0.90.0130.00917.38
8.0.80.0190.00217.33
8.0.70.0070.00417.40
8.0.60.0150.00217.31
8.0.50.0120.00517.23
8.0.30.0070.00717.44
8.0.20.0040.00817.50
8.0.10.0140.00817.55
7.4.330.0140.00314.86
7.4.320.0150.00717.01
7.4.300.0150.00717.09
7.4.290.0210.00517.08
7.4.280.0200.00317.04
7.4.270.0150.00717.15
7.4.260.0160.00417.12
7.4.250.0130.00717.00
7.4.240.0200.00417.07
7.4.230.0210.00417.08
7.4.220.0160.00617.14
7.4.210.0170.00617.03
7.4.200.0180.00716.99
7.4.190.0180.00417.12
7.4.180.0170.00017.20
7.4.160.0160.00517.09
7.4.150.0150.00317.16
7.4.140.0170.00017.18
7.4.130.0160.00317.10
7.4.120.0120.00717.08
7.4.110.0130.00517.21
7.4.100.0170.00417.00
7.4.90.0130.00917.08
7.4.80.0160.00317.08
7.4.70.0080.01017.10
7.4.60.0170.00317.12
7.4.50.0100.00817.13
7.4.40.0130.00517.02
7.4.30.0170.00317.00
7.4.20.0170.00716.99
7.4.10.0210.00317.19
7.4.00.0090.01117.04

preferences:
30.86 ms | 403 KiB | 5 Q