3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = <<<URLS https://example.com/cost-center/sub-one/sub-two/article-3/ https://example.com/cost-center/sub-one/sub-three/article-4 https://example.com/cost-center/sub-1/sub-two/sub-three/article-5/ 'https://example.com/cost-center/sub-one/sub-two/article-3/' 'https://example.com/cost-center/sub-1/sub-two/sub-three/article-5' "https://example.com/cost-center/sub-one/sub-three/article-4" "https://example.com/cost-center/sub-1/sub-two/sub-three/article-5/" URLS; echo preg_replace('#https://[^/]+/cost-center/\K([^/\s]+/)+(?=article)#', 'test/', $test);

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.10.0110.00718.36
8.5.00.0130.00820.10
8.4.150.0010.00114.05
8.4.140.0130.00817.46
8.4.130.0040.00717.82
8.4.120.0120.01020.43
8.4.110.0100.00622.28
8.4.100.0130.00717.68
8.4.90.0070.00320.71
8.4.80.0080.00918.77
8.4.70.0100.00718.78
8.4.60.0020.00618.81
8.4.50.0040.01218.77
8.4.40.0070.00417.99
8.4.30.0100.01020.38
8.4.20.0100.01018.18
8.4.10.0040.00419.83
8.3.280.0110.00918.72
8.3.270.0140.00616.48
8.3.260.0090.01016.73
8.3.250.0110.00818.79
8.3.240.0060.00216.60
8.3.230.0100.01016.65
8.3.220.0100.00818.71
8.3.210.0070.01316.55
8.3.200.0050.00416.65
8.3.190.0140.00616.97
8.3.180.0060.00818.72
8.3.170.0160.00316.55
8.3.160.0040.00417.19
8.3.150.0200.00018.75
8.3.140.0090.00618.78
8.3.130.0040.00418.43
8.3.120.0040.00418.71
8.3.110.0060.00316.75
8.3.100.0030.00616.91
8.3.90.0000.00726.77
8.3.80.0030.00616.50
8.3.70.0140.00716.63
8.3.60.0110.01116.75
8.3.50.0110.00416.63
8.3.40.0030.01021.77
8.3.30.0080.00819.00
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0140.00520.72
8.2.280.0120.00718.57
8.2.270.0110.00716.51
8.2.260.0060.00316.65
8.2.250.0040.00418.69
8.2.240.0060.00917.07
8.2.230.0080.00020.94
8.2.220.0030.00624.06
8.2.210.0110.00026.77
8.2.200.0060.00316.75
8.2.190.0140.00718.66
8.2.180.0070.00716.38
8.2.170.0030.01218.94
8.2.160.0070.00722.96
8.2.150.0030.00525.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00821.19
8.2.110.0040.00420.24
8.2.100.0190.01218.44
8.2.90.0270.00418.44
8.2.80.0250.00718.44
8.2.70.0270.00518.44
8.2.60.0310.00018.44
8.2.50.0290.00318.44
8.2.40.0190.00318.79
8.2.30.0150.01218.44
8.2.20.0220.00618.44
8.2.10.0250.00318.44
8.2.00.0260.00018.44
8.1.330.0120.00721.89
8.1.320.0120.00617.81
8.1.310.0150.00616.76
8.1.300.0040.00420.04
8.1.290.0000.00930.84
8.1.280.0120.00325.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00719.40
8.1.230.0060.01219.09
8.1.220.0250.00418.44
8.1.210.0160.01218.44
8.1.200.0290.00018.44
8.1.190.0190.00818.44
8.1.180.0220.00618.44
8.1.170.0160.01118.44
8.1.160.0190.00718.44
8.1.150.0240.00918.44
8.1.140.0180.00818.44
8.1.130.0240.00318.44
8.1.120.0250.00318.44
8.1.110.0210.00518.44
8.1.100.0250.00318.44
8.1.90.0210.00418.44
8.1.80.0230.00318.44
8.1.70.0210.00518.44
8.1.60.0230.00318.44
8.1.50.0230.00518.44
8.1.40.0250.00018.44
8.1.30.0270.00018.44
8.1.20.0210.00518.44
8.1.10.0190.00818.44
8.1.00.0220.00518.44
8.0.300.0240.00418.44
8.0.290.0310.00018.44
8.0.280.0250.00318.44
8.0.270.0200.00818.44
8.0.260.0270.00218.44
8.0.250.0150.01218.44
8.0.240.0240.00018.44
8.0.230.0240.00518.44
8.0.220.0290.00018.44
8.0.210.0200.00718.44
8.0.200.0280.00018.44
8.0.190.0190.01018.44
8.0.180.0220.00618.44
8.0.170.0250.00318.44
8.0.160.0230.00718.44
8.0.150.0210.00818.44
8.0.140.0190.00618.44
8.0.130.0280.00318.44
8.0.120.0270.00018.44
8.0.110.0230.00518.44
8.0.100.0190.00818.44
8.0.90.0190.01018.44
8.0.80.0270.00018.44
8.0.70.0190.00918.44
8.0.60.0250.00018.44
8.0.50.0190.00518.44
8.0.30.0220.00418.44
8.0.20.0200.00618.44
8.0.10.0210.00518.44

preferences:
36.73 ms | 403 KiB | 5 Q