3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urlKey = 'ftrcvgbhnjk-2000-4628-20.html'; $oldUrlKey = null; if (preg_match('/^.*-[0-9]+(-[0-9]+)\.html$/', $urlKey, $matches)) { substr_replace($urlKey, '', strpos($urlKey, $matches[1]), strlen($matches[1])); $index[$oldUrlKey] = '----'; } var_dump($matches); echo $oldUrlKey;

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.0070.01116.75
8.3.50.0100.00922.01
8.3.40.0110.00418.93
8.3.30.0040.01119.27
8.3.20.0060.00320.21
8.3.10.0000.00823.70
8.3.00.0050.00320.76
8.2.180.0040.01116.47
8.2.170.0040.01122.96
8.2.160.0100.00322.24
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.73
8.2.110.0050.00522.39
8.2.100.0040.00817.84
8.2.90.0000.00819.40
8.2.80.0040.00417.97
8.2.70.0100.00017.88
8.2.60.0050.00318.03
8.2.50.0040.00418.07
8.2.40.0040.00418.32
8.2.30.0080.00018.21
8.2.20.0040.00417.98
8.2.10.0000.00717.86
8.2.00.0040.00417.94
8.1.280.0150.00625.92
8.1.270.0040.00424.01
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0040.00423.82
8.1.230.0030.00719.08
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0070.00317.35
8.1.190.0030.00517.39
8.1.180.0000.00818.10
8.1.170.0030.00518.68
8.1.160.0060.00322.04
8.1.150.0040.00418.70
8.1.140.0070.00017.54
8.1.130.0030.00317.91
8.1.120.0040.00417.48
8.1.110.0040.00417.43
8.1.100.0040.00417.43
8.1.90.0030.00417.58
8.1.80.0030.00317.55
8.1.70.0060.00317.44
8.1.60.0030.00617.71
8.1.50.0060.00317.66
8.1.40.0040.00417.58
8.1.30.0030.00517.63
8.1.20.0040.00417.81
8.1.10.0030.00617.67
8.1.00.0000.00817.55
8.0.300.0040.00418.77
8.0.290.0000.00717.17
8.0.280.0030.00318.51
8.0.270.0030.00317.23
8.0.260.0030.00316.98
8.0.250.0070.00016.99
8.0.240.0070.00017.04
8.0.230.0000.00717.05
8.0.220.0040.00416.97
8.0.210.0000.00716.89
8.0.200.0030.00317.04
8.0.190.0040.00417.03
8.0.180.0000.00716.98
8.0.170.0050.00316.86
8.0.160.0050.00316.96
8.0.150.0040.00416.91
8.0.140.0070.00016.95
8.0.130.0030.00313.37
8.0.120.0080.00016.98
8.0.110.0040.00416.99
8.0.100.0000.00816.88
8.0.90.0080.00017.03
8.0.80.0080.00616.98
8.0.70.0030.00616.83
8.0.60.0030.00516.78
8.0.50.0000.00816.98
8.0.30.0150.00417.17
8.0.20.0150.00317.40
8.0.10.0050.00317.12
8.0.00.0100.00717.13
7.4.330.0000.00515.00
7.4.320.0030.00316.76
7.4.300.0030.00316.66
7.4.290.0030.00316.59
7.4.280.0050.00316.65
7.4.270.0000.00716.74
7.4.260.0070.00016.57
7.4.250.0040.00416.61
7.4.240.0060.00116.77
7.4.230.0040.00416.71
7.4.220.0030.01316.86
7.4.210.0100.00816.74
7.4.200.0000.00716.69
7.4.190.0000.00716.65
7.4.160.0040.01116.65
7.4.150.0100.00717.40
7.4.140.0100.00917.86
7.4.130.0110.00716.81
7.4.120.0130.00816.67
7.4.110.0130.00316.60
7.4.100.0120.01216.63
7.4.90.0060.01816.86
7.4.80.0040.01816.70
7.4.70.0100.01316.74
7.4.60.0130.00516.56
7.4.50.0040.00416.64
7.4.40.0070.01022.77
7.4.30.0080.00816.84
7.4.00.0070.01014.91
7.3.330.0030.00313.29
7.3.320.0050.00013.25
7.3.310.0030.00316.39
7.3.300.0000.00716.29
7.3.290.0030.01016.39
7.3.280.0110.00716.46
7.3.270.0080.00817.40
7.3.260.0120.00616.50
7.3.250.0070.01116.63
7.3.240.0140.00516.54
7.3.230.0100.00716.49
7.3.210.0090.01216.33
7.3.200.0040.01619.39
7.3.190.0070.01016.31
7.3.180.0090.01216.43
7.3.170.0030.01416.48
7.3.160.0070.01016.54
7.3.120.0070.01115.09
7.3.00.0040.01216.91
7.2.330.0090.00916.95
7.2.320.0090.00916.93
7.2.310.0130.00416.83
7.2.300.0030.01316.89
7.2.290.0110.00616.57
7.2.130.0160.00317.04
7.2.120.0070.00717.12
7.2.110.0040.00717.16
7.2.100.0070.00416.65
7.2.90.0180.00317.18
7.2.80.0030.01017.05
7.2.70.0100.01017.18
7.2.60.0060.00617.04
7.2.50.0040.01216.70
7.2.40.0040.00917.11
7.2.30.0090.00916.98
7.2.20.0030.01316.89
7.2.10.0160.00317.12
7.2.00.0050.00718.21
7.1.250.0100.00715.63
7.1.240.0060.01115.94
7.1.230.0080.00015.98
7.1.220.0000.01115.89
7.1.210.0030.01015.91
7.1.200.0000.01016.13
7.1.190.0000.01515.95
7.1.180.0120.00016.02
7.1.170.0150.00316.08
7.1.160.0150.00015.91
7.1.150.0090.00315.97
7.1.140.0060.00615.74
7.1.130.0030.00916.08
7.1.120.0080.00815.93
7.1.110.0100.00016.01
7.1.100.0550.00515.92
7.1.90.0070.01115.74
7.1.80.0090.00615.71
7.1.70.0050.00616.68
7.1.60.0050.01317.56
7.1.50.0080.00516.56
7.1.40.0090.00616.00
7.1.30.0040.01215.83
7.1.20.0070.00716.00
7.1.10.0070.00715.93
7.1.00.0060.04019.15
7.0.330.0030.00915.25
7.0.320.0100.00315.38
7.0.310.0070.01015.31
7.0.300.0040.00815.79
7.0.290.0030.01015.86
7.0.280.0060.00915.63
7.0.270.0030.01015.58
7.0.260.0050.01015.55
7.0.250.0110.00615.23
7.0.240.0070.01115.73
7.0.230.0000.01615.73
7.0.220.0000.01515.63
7.0.210.0070.00715.34
7.0.200.0080.00616.26
7.0.190.0120.00315.65
7.0.180.0100.00515.78
7.0.170.0120.01215.55
7.0.160.0120.00415.25
7.0.150.0030.01015.47
7.0.140.0020.04418.65
7.0.130.0060.00915.72
7.0.120.0040.01215.64
7.0.110.0080.00315.72
7.0.100.0110.00315.38
7.0.90.0040.00815.74
7.0.80.0040.00815.57
7.0.70.0060.00915.47
7.0.60.0050.03117.67
7.0.50.0030.03216.86
7.0.40.0050.04216.79
7.0.30.0150.03016.87
7.0.20.0150.04516.99
7.0.10.0020.04116.83
7.0.00.0050.04416.94
5.6.380.0080.00414.71
5.6.370.0030.00714.43
5.6.360.0060.00614.83
5.6.350.0030.01014.63
5.6.340.0040.00814.63
5.6.330.0090.00614.52
5.6.320.0090.00614.66
5.6.310.0000.01114.85
5.6.300.0130.00014.66
5.6.290.0000.01514.74
5.6.280.0030.04017.71
5.6.270.0070.01014.65
5.6.260.0070.00714.45
5.6.250.0000.01314.11
5.6.240.0070.00314.59
5.6.230.0030.00714.06
5.6.220.0130.00014.40
5.6.210.0090.04217.64
5.6.200.0050.03516.29
5.6.190.0050.04517.40
5.6.180.0130.04217.35
5.6.170.0110.02517.30
5.6.160.0080.04217.48
5.6.150.0050.04316.39
5.6.140.0050.04616.27
5.6.130.0030.04016.39
5.6.120.0080.04517.92
5.6.110.0070.03217.63
5.6.100.0050.03117.63
5.6.90.0100.04717.71
5.6.80.0060.02117.44
5.6.70.0080.00414.50
5.6.60.0060.00614.46
5.6.50.0060.00714.15
5.6.40.0030.00714.25
5.6.30.0040.00914.36
5.6.20.0070.00714.36
5.6.10.0110.00414.11
5.6.00.0040.00814.37
5.5.380.0080.00011.33
5.5.370.0060.00010.90
5.5.360.0070.00311.24
5.5.350.0050.03715.82
5.5.340.0000.02714.56
5.5.330.0100.02115.81
5.5.320.0170.03515.61
5.5.310.0140.04415.63
5.5.300.0020.04514.52
5.5.290.0160.02314.69
5.5.280.0020.02615.93
5.5.270.0080.03815.81
5.5.260.0130.03115.95
5.5.250.0070.04315.95
5.5.240.0000.04315.59
5.5.230.0040.00410.93
5.5.220.0030.00610.90
5.5.210.0090.00311.13
5.5.200.0080.00210.99
5.5.190.0050.00511.05
5.5.180.0020.00711.04
5.5.170.0080.00411.05
5.5.160.0140.00011.09
5.5.150.0080.00410.90
5.5.140.0000.00811.03
5.5.130.0060.00911.18
5.5.120.0100.00010.90
5.5.110.0000.01210.90
5.5.100.0040.00511.07
5.5.90.0080.00411.20
5.5.80.0050.00510.99
5.5.70.0090.00011.37
5.5.60.0000.00811.17
5.5.50.0080.00410.90
5.5.40.0090.00310.91
5.5.30.0040.00410.95
5.5.20.0030.00611.04
5.5.10.0030.00810.96
5.5.00.0030.00610.90
5.4.450.0310.01915.17
5.4.440.0170.02515.04
5.4.430.0170.03815.13
5.4.420.0220.03515.30
5.4.410.0250.03515.22
5.4.400.0240.03014.81
5.4.390.0280.03714.74
5.4.380.0080.03114.79
5.4.370.0070.02914.84
5.4.360.0160.02714.79
5.4.350.0070.03114.79
5.4.340.0160.03014.73
5.4.330.0030.00611.09
5.4.320.0060.02011.68
5.4.310.0060.02311.73
5.4.300.0040.02411.69
5.4.290.0060.02211.80
5.4.280.0060.02311.63
5.4.270.0040.02311.62
5.4.260.0110.02311.64
5.4.250.0090.02011.82
5.4.240.0060.01811.72
5.4.230.0040.02311.68
5.4.220.0040.02011.78
5.4.210.0050.01911.62
5.4.200.0060.01911.76
5.4.190.0090.02511.62
5.4.180.0100.02311.62
5.4.170.0070.02611.63
5.4.160.0110.02311.68
5.4.150.0140.03411.78
5.4.140.0090.02311.54
5.4.130.0110.02411.47
5.4.120.0140.03211.59
5.4.110.0100.02111.43
5.4.100.0060.02611.43
5.4.90.0110.02211.54
5.4.80.0070.02411.63
5.4.70.0090.02311.43
5.4.60.0090.02311.45
5.4.50.0110.03711.50
5.4.40.0120.02211.49
5.4.30.0130.02111.42
5.4.20.0130.03411.42
5.4.10.0090.02311.58
5.4.00.0090.02411.20
5.3.290.0090.02111.85
5.3.280.0080.02211.80
5.3.270.0220.04311.81
5.3.260.0110.02411.81
5.3.250.0070.02711.81
5.3.240.0080.02511.81
5.3.230.0070.02711.80
5.3.220.0090.02411.79
5.3.210.0100.02411.79
5.3.200.0120.03611.79
5.3.190.0090.02611.79
5.3.180.0080.02611.79
5.3.170.0090.02511.78
5.3.160.0230.04311.79
5.3.150.0100.02311.78
5.3.140.0090.02611.78
5.3.130.0110.03811.78
5.3.120.0110.02311.78
5.3.110.0080.02411.78
5.3.100.0080.02511.51
5.3.90.0120.03711.49
5.3.80.0070.02911.49
5.3.70.0090.02611.49
5.3.60.0110.02311.48
5.3.50.0110.02311.45
5.3.40.0110.02711.45
5.3.30.0100.02511.43
5.3.20.0180.04711.32
5.3.10.0110.02211.30
5.3.00.0070.02611.29
5.2.170.0070.01910.04
5.2.160.0210.05410.04
5.2.150.0050.02110.04
5.2.140.0100.01810.04
5.2.130.0080.02010.03
5.2.120.0070.02110.02
5.2.110.0080.01910.03
5.2.100.0070.01910.02
5.2.90.0130.02910.03
5.2.80.0080.01910.02
5.2.70.0070.02210.02
5.2.60.0120.04510.00
5.2.50.0090.0199.98
5.2.40.0100.0189.97
5.2.30.0070.0209.96
5.2.20.0110.0179.96
5.2.10.0150.0439.91
5.2.00.0080.0199.84
5.1.60.0110.0129.48
5.1.50.0090.0149.48
5.1.40.0070.0319.47
5.1.30.0070.0209.65
5.1.20.0060.0209.66
5.1.10.0080.0189.52
5.1.00.0050.0199.52
5.0.50.0090.0108.76
5.0.40.0150.0358.69
5.0.30.0060.0188.59
5.0.20.0040.0148.58
5.0.10.0060.0138.57
5.0.00.0070.0168.57
4.4.90.0040.0117.84
4.4.80.0040.0127.83
4.4.70.0070.0097.83
4.4.60.0030.0127.83
4.4.50.0020.0127.83
4.4.40.0090.0137.80
4.4.30.0180.0437.83
4.4.20.0060.0097.87
4.4.10.0040.0127.87
4.4.00.0070.0137.83
4.3.110.0020.0117.78
4.3.100.0050.0107.78
4.3.90.0020.0117.77
4.3.80.0030.0177.74
4.3.70.0060.0097.76
4.3.60.0060.0087.76
4.3.50.0050.0097.76
4.3.40.0050.0147.72
4.3.30.0050.0107.09
4.3.20.0030.0107.08
4.3.10.0020.0117.06
4.3.00.0100.01013.19

preferences:
49.57 ms | 401 KiB | 5 Q