3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string="localhost/uploads/images/photo.jpg"; $string2="localhost/uploads/images/photo_thumb.jpg"; $replacement="$1/$2_thumb.$3"; $pattern= '/([\w+\/]*)(?=\/)\/([\w]+(?<!_thumb))\.(\w+)/i'; echo preg_replace($pattern, $replacement, $string); echo "\n\r"; echo preg_replace($pattern, $replacement, $string2);

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.0150.01020.09
8.4.150.0030.00014.05
8.4.140.0110.01017.51
8.4.130.0140.00617.81
8.4.120.0100.01020.52
8.4.110.0110.01022.66
8.4.100.0140.00717.97
8.4.90.0090.01218.52
8.4.80.0110.01018.13
8.4.70.0130.00618.01
8.4.60.0120.00920.51
8.4.50.0110.00918.04
8.4.40.0070.01519.64
8.4.30.0130.00717.86
8.4.20.0050.00517.75
8.4.10.0030.00618.74
8.3.280.0180.01118.23
8.3.270.0090.01116.46
8.3.260.0090.01116.63
8.3.250.0120.00618.83
8.3.240.0130.00617.23
8.3.230.0150.00516.53
8.3.220.0100.00917.30
8.3.210.0100.01016.61
8.3.200.0050.00416.66
8.3.190.0100.00816.70
8.3.180.0060.00418.38
8.3.170.0070.00718.68
8.3.160.0110.00716.53
8.3.150.0130.00620.50
8.3.140.0030.00616.79
8.3.130.0050.00318.36
8.3.120.0090.00020.61
8.3.110.0060.00320.94
8.3.100.0070.00424.06
8.3.90.0040.00426.77
8.3.80.0040.00417.97
8.3.70.0190.00318.55
8.3.60.0070.01518.43
8.3.50.0090.00618.35
8.3.40.0120.00318.84
8.3.30.0060.00918.84
8.3.20.0080.00021.76
8.3.10.0080.00023.45
8.3.00.0040.00419.68
8.2.290.0090.01120.23
8.2.280.0110.00718.47
8.2.270.0180.00018.91
8.2.260.0040.00418.73
8.2.250.0000.00818.50
8.2.240.0050.00517.32
8.2.230.0090.00622.58
8.2.220.0000.00837.54
8.2.210.0000.00726.77
8.2.200.0030.00618.88
8.2.190.0100.00718.34
8.2.180.0110.00418.79
8.2.170.0140.00322.96
8.2.160.0070.00720.44
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0020.00519.32
8.2.120.0000.00726.35
8.2.110.0060.00319.27
8.2.100.0070.00417.91
8.2.90.0030.00517.97
8.2.80.0030.00617.97
8.2.70.0000.00917.75
8.2.60.0040.00418.04
8.2.50.0060.00318.07
8.2.40.0040.00418.28
8.2.30.0000.00717.99
8.2.20.0040.00418.16
8.2.10.0000.00818.03
8.2.00.0050.00318.04
8.1.330.0090.01021.63
8.1.320.0130.00615.97
8.1.310.0040.01116.88
8.1.300.0090.00018.06
8.1.290.0080.00330.84
8.1.280.0110.00425.92
8.1.270.0040.00422.20
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0090.00019.25
8.1.230.0080.00422.21
8.1.220.0050.00317.79
8.1.210.0080.00018.80
8.1.200.0000.00817.35
8.1.190.0030.00517.22
8.1.180.0000.00818.10
8.1.170.0050.00318.58
8.1.160.0000.00718.91
8.1.150.0000.00719.12
8.1.140.0030.00617.69
8.1.130.0040.00418.97
8.1.120.0000.00717.58
8.1.110.0080.00017.53
8.1.100.0050.00317.59
8.1.90.0040.00417.58
8.1.80.0000.00717.46
8.1.70.0030.00317.55
8.1.60.0000.00817.58
8.1.50.0000.00817.59
8.1.40.0080.00017.51
8.1.30.0060.00317.68
8.1.20.0030.00517.80
8.1.10.0080.00017.58
8.1.00.0070.00017.57
8.0.300.0000.00720.15
8.0.290.0030.00617.00
8.0.280.0040.00418.50
8.0.270.0030.00317.31
8.0.260.0040.00417.30
8.0.250.0060.00017.04
8.0.240.0030.00317.15
8.0.230.0030.00317.05
8.0.220.0030.00416.89
8.0.210.0030.00316.93
8.0.200.0030.00317.09
8.0.190.0040.00416.93
8.0.180.0030.00917.00
8.0.170.0120.00017.03
8.0.160.0000.00717.07
8.0.150.0000.00716.96
8.0.140.0000.00716.82
8.0.130.0030.00313.38
8.0.120.0040.00416.91
8.0.110.0040.00416.94
8.0.100.0000.00716.89
8.0.90.0080.00016.87
8.0.80.0070.01016.88
8.0.70.0000.00816.99
8.0.60.0050.00316.99
8.0.50.0000.00817.02
8.0.30.0120.00617.22
8.0.20.0160.00617.40
8.0.10.0000.00717.16
8.0.00.0090.00916.96
7.4.330.0000.00515.55
7.4.320.0030.00316.80
7.4.300.0060.00016.77
7.4.290.0030.00316.63
7.4.280.0040.00416.59
7.4.270.0030.00316.77
7.4.260.0040.00416.73
7.4.250.0040.00416.71
7.4.240.0000.00716.61
7.4.230.0030.00316.84
7.4.220.0000.00716.65
7.4.210.0130.00216.65
7.4.200.0040.00416.73
7.4.160.0070.01016.69
7.4.140.0150.00817.86
7.4.130.0150.00316.60
7.4.120.0110.00916.64
7.4.110.0060.01216.78
7.4.100.0090.00916.77
7.4.90.0130.00316.63
7.4.80.0160.00319.39
7.4.70.0030.01316.55
7.4.60.0130.01016.71
7.4.50.0060.00916.40
7.4.40.0090.00916.66
7.4.00.0030.01315.26
7.3.330.0050.00013.17
7.3.320.0030.00313.13
7.3.310.0040.00416.45
7.3.300.0000.00716.30
7.3.290.0000.00716.28
7.3.280.0050.01416.26
7.3.260.0110.00816.57
7.3.240.0080.00816.49
7.3.230.0140.00316.36
7.3.210.0100.00716.64
7.3.200.0070.01116.39
7.3.190.0120.00616.43
7.3.180.0100.00616.32
7.3.170.0070.01016.42
7.3.160.0060.01516.74
7.3.10.0320.00716.20
7.3.00.0230.00616.37
7.2.330.0110.00716.70
7.2.320.0130.01016.59
7.2.310.0070.01316.54
7.2.300.0110.00716.48
7.2.290.0080.00816.59
7.2.130.0240.00416.76
7.2.120.0240.00716.44
7.2.110.0270.00316.34
7.2.100.0200.00316.57
7.2.90.0150.01016.75
7.2.80.0450.00416.75
7.2.70.0380.00817.16
7.2.60.0130.00416.55
7.2.50.0040.01316.35
7.2.40.0540.01317.32
7.2.30.0620.00917.16
7.2.20.0510.00917.24
7.2.10.0970.01017.22
7.2.00.0580.01017.47
7.1.250.0190.01315.24
7.1.200.0000.01115.93
7.1.160.0710.00917.04
7.1.150.0780.01116.67
7.1.140.1190.01416.93
7.1.130.1060.01016.98
7.1.120.1080.01517.23
7.1.110.0920.01116.00
7.1.100.0790.00816.24
7.1.90.1570.01316.60
7.1.80.1490.01516.52
7.1.70.0810.00915.55
7.1.60.0860.01433.50
7.1.50.0970.00832.77
7.1.40.0800.01232.82
7.1.30.0930.01232.80
7.1.20.1110.01433.08
7.1.10.0880.01314.82
7.1.00.0890.01115.18

preferences:
35.84 ms | 403 KiB | 5 Q