3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filenames = [ 'abc(3).jpg', 'xyz.pdf' ]; foreach ($filenames as $filename) { echo preg_replace_callback('/(?:\((\d+)\))?(\.[^.]+$)/', function($matches) { $version = empty($matches[1]) ? 0 : $matches[1]; return '(' . ($version + 1) . ')' . $matches[2]; }, $filename); echo "\n"; }

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.130.0140.00817.99
8.4.120.0130.01020.59
8.4.110.0040.00518.72
8.4.100.0040.00518.12
8.4.90.0160.00518.53
8.4.80.0040.00418.00
8.4.70.0120.00617.93
8.4.60.0060.00418.76
8.4.50.0050.00418.10
8.4.40.0150.00619.64
8.4.30.0190.00020.33
8.4.20.0100.01020.71
8.4.10.0000.00919.60
8.3.260.0140.00516.77
8.3.250.0080.00918.83
8.3.240.0110.00818.51
8.3.230.0110.00816.48
8.3.220.0120.00717.48
8.3.210.0120.00716.82
8.3.200.0120.00716.74
8.3.190.0110.00817.41
8.3.180.0070.00316.66
8.3.170.0040.00418.79
8.3.160.0070.01118.74
8.3.150.0080.00818.77
8.3.140.0090.00016.75
8.3.130.0050.00318.57
8.3.120.0120.00420.70
8.3.110.0050.00316.74
8.3.100.0100.00016.54
8.3.90.0070.00726.77
8.3.80.0110.00316.75
8.3.70.0100.00618.18
8.3.60.0110.00718.05
8.3.50.0070.01118.03
8.3.40.0120.00918.82
8.3.30.0120.00618.74
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0050.00226.16
8.2.290.0080.01120.27
8.2.280.0050.00418.63
8.2.270.0040.01417.29
8.2.260.0060.00318.77
8.2.250.0070.01116.73
8.2.240.0030.00617.07
8.2.230.0060.00320.94
8.2.220.0060.00324.06
8.2.210.0090.00626.77
8.2.200.0040.00818.79
8.2.190.0130.01018.66
8.2.180.0100.00725.92
8.2.170.0110.01118.94
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00420.86
8.2.110.0050.00521.05
8.2.100.0080.00417.97
8.2.90.0050.00320.41
8.2.80.0040.00420.36
8.2.70.0000.00817.75
8.2.60.0080.00017.93
8.2.50.0030.00518.05
8.2.40.0040.00418.28
8.2.30.0070.00018.04
8.2.20.0000.00818.16
8.2.10.0060.00319.41
8.2.00.0040.00419.34
8.1.330.0100.00821.91
8.1.320.0120.00816.39
8.1.310.0070.00016.93
8.1.300.0070.01118.18
8.1.290.0080.00030.84
8.1.280.0060.00925.92
8.1.270.0060.00322.23
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00422.03
8.1.230.0080.00420.94
8.1.220.0090.00017.74
8.1.210.0060.00318.91
8.1.200.0070.00317.47
8.1.190.0050.00317.48
8.1.180.0030.00618.10
8.1.170.0040.00418.84
8.1.160.0040.00419.11
8.1.150.0030.00518.92
8.1.140.0080.00018.86
8.1.130.0060.00319.41
8.1.120.0000.01017.52
8.1.110.0090.00017.54
8.1.100.0050.00317.50
8.1.90.0040.00417.59
8.1.80.0050.00217.65
8.1.70.0000.00817.52
8.1.60.0030.00717.73
8.1.50.0040.00417.71
8.1.40.0000.00717.60
8.1.30.0040.00417.75
8.1.20.0000.00817.71
8.1.10.0080.00417.71
8.1.00.0050.00317.52
8.0.300.0000.00719.90
8.0.290.0040.00416.88
8.0.280.0070.00018.38
8.0.270.0020.00518.09
8.0.260.0000.00717.04
8.0.250.0030.00317.13
8.0.240.0030.00317.00
8.0.230.0070.00017.18
8.0.220.0040.00417.02
8.0.210.0000.00717.00
8.0.200.0000.00717.03
8.0.190.0070.00017.16
8.0.180.0000.00717.12
8.0.170.0040.00417.10
8.0.160.0000.00717.02
8.0.150.0000.00716.93
8.0.140.0040.00416.97
8.0.130.0050.00013.59
8.0.120.0040.00417.12
8.0.110.0000.00816.94
8.0.100.0000.00817.08
8.0.90.0030.00516.97
8.0.80.0070.00817.04
8.0.70.0040.00417.00
8.0.60.0070.00017.14
8.0.50.0040.00417.07
8.0.30.0080.01117.02
8.0.20.0070.01017.10
8.0.10.0070.01117.25
8.0.00.0100.01017.18
7.4.330.0020.00215.55
7.4.320.0000.00716.82
7.4.300.0060.00016.61
7.4.290.0000.00716.66
7.4.280.0030.00516.72
7.4.270.0030.00316.73
7.4.260.0000.00613.48
7.4.250.0070.00016.82
7.4.240.0000.00716.73
7.4.230.0000.00716.70
7.4.220.0030.00316.78
7.4.210.0070.00816.75
7.4.200.0000.00716.51
7.4.160.0100.01316.93
7.4.150.0030.01316.87
7.4.140.0110.01116.73
7.4.130.0130.00616.77
7.4.120.0180.00316.72
7.4.110.0000.01816.88
7.4.100.0470.00616.79
7.4.90.0090.01216.76
7.4.80.0150.00916.71
7.4.70.0200.00516.81
7.4.60.0080.01616.55
7.4.50.0230.00016.63
7.4.40.0150.00316.66
7.4.30.0000.01716.62
7.4.20.0120.00416.47
7.4.10.0110.01116.77
7.4.00.0070.01016.68
7.3.330.0000.00716.41
7.3.320.0030.00313.50
7.3.310.0050.00316.41
7.3.300.0030.00316.37
7.3.290.0090.00916.43
7.3.270.0090.00816.36
7.3.260.0110.01216.43
7.3.250.0140.00716.41
7.3.240.0160.00716.37
7.3.230.0090.01216.41
7.3.220.0090.01216.39
7.3.210.0030.01616.44
7.3.200.0170.00616.41
7.3.190.0190.00716.43
7.3.180.0200.01216.39
7.3.170.0100.01316.42
7.3.160.0060.01216.39
7.3.150.0140.00816.42
7.3.140.0190.00316.39
7.3.130.0160.00416.41
7.3.120.0140.00716.41
7.3.110.0150.00916.35
7.3.100.0090.00916.34
7.3.90.0000.01516.67
7.3.80.0090.01016.39
7.3.70.0080.00816.51
7.3.60.0060.00916.48
7.3.50.0130.01316.57
7.3.40.0030.01216.58
7.3.30.0120.00916.59
7.3.20.0060.01516.52
7.3.10.0130.01016.45
7.3.00.0170.00316.54

preferences:
116.5 ms | 403 KiB | 5 Q