3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "we have a card [mtgcard]tarmogoyf[/mtgcard] "; $string .= "and [mtgcard]forest[/mtgcard] "; $string = preg_replace('/\[mtgcard\](.*?)\[\/mtgcard\]/', '<a href="https://deckbox.org/mtg/$1">$1</a>', $string); echo $string; $string = "we have a card [mtgcard]tarmogoyf[/mtgcard] "; $string .= "and [mtgcard]forest[/mtgcard] "; preg_match_all('/\[mtgcard\](.*?)\[\/mtgcard\]/', $string, $matches); $arr = $matches[1]; foreach ($arr as &$a) { $a = "<a href=\"https://deckbox.org/mtg/$a\">$a</a>"; } print_r($arr);

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.70.0070.00718.30
8.3.60.0090.00618.27
8.3.50.0060.00918.34
8.3.40.0180.00018.65
8.3.30.0120.00318.97
8.3.20.0080.00021.76
8.3.10.0080.00021.64
8.3.00.0040.00420.64
8.2.190.0090.00916.63
8.2.180.0110.00718.44
8.2.170.0070.00722.96
8.2.160.0100.00721.14
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0060.00319.16
8.2.110.0190.00019.30
8.2.100.0080.00417.97
8.2.90.0090.00017.97
8.2.80.0000.00818.22
8.2.70.0000.00817.75
8.2.60.0040.00418.28
8.2.50.0000.00818.16
8.2.40.0050.00219.47
8.2.30.0030.00519.33
8.2.20.0040.00418.16
8.2.10.0070.00319.13
8.2.00.0000.00719.33
8.1.280.0080.01125.92
8.1.270.0070.00420.76
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0000.01019.40
8.1.230.0040.00720.97
8.1.220.0000.00917.79
8.1.210.0060.00318.90
8.1.200.0000.00817.48
8.1.190.0030.00517.60
8.1.180.0000.00918.10
8.1.170.0030.00518.77
8.1.160.0000.00818.95
8.1.150.0000.00718.94
8.1.140.0040.00418.87
8.1.130.0060.00317.54
8.1.120.0070.00017.51
8.1.110.0040.00417.62
8.1.100.0030.00617.57
8.1.90.0000.00817.62
8.1.80.0040.00417.50
8.1.70.0000.00717.51
8.1.60.0060.00317.70
8.1.50.0000.01217.69
8.1.40.0000.00817.55
8.1.30.0090.00017.63
8.1.20.0050.00317.75
8.1.10.0030.00617.75
8.1.00.0060.00317.66
8.0.300.0060.00319.98
8.0.290.0080.00416.58
8.0.280.0050.00218.37
8.0.270.0030.00717.20
8.0.260.0030.00316.97
8.0.250.0030.00417.07
8.0.240.0040.00416.96
8.0.230.0070.00017.05
8.0.220.0000.00716.93
8.0.210.0030.00317.07
8.0.200.0000.00617.03
8.0.190.0040.00417.15
8.0.180.0050.00316.96
8.0.170.0060.00317.07
8.0.160.0000.00717.04
8.0.150.0000.00717.07
8.0.140.0030.00516.99
8.0.130.0000.00613.43
8.0.120.0040.00417.01
8.0.110.0000.00716.93
8.0.100.0070.00016.86
8.0.90.0030.00616.95
8.0.80.0030.01717.07
8.0.70.0050.00216.89
8.0.60.0070.00016.90
8.0.50.0030.00317.00
8.0.30.0120.00617.36
8.0.20.0120.00617.10
8.0.10.0040.00416.98
8.0.00.0080.01216.70
7.4.330.0000.00515.55
7.4.320.0030.00316.76
7.4.300.0030.00316.70
7.4.290.0070.00316.80
7.4.280.0070.00016.73
7.4.270.0030.00316.71
7.4.260.0050.00013.47
7.4.250.0000.00716.54
7.4.240.0020.00516.76
7.4.230.0080.00016.80
7.4.220.0030.00316.70
7.4.210.0060.01216.81
7.4.200.0070.00016.70
7.4.130.0150.00316.80
7.4.120.0110.00816.71
7.4.110.0130.00316.66
7.4.100.0060.01216.80
7.4.90.0100.00716.90
7.4.80.0060.01219.39
7.4.70.0090.00616.57
7.4.60.0060.00916.58
7.4.50.0000.01216.72
7.4.40.0120.00616.65
7.4.00.0070.00914.97
7.3.330.0030.00316.53
7.3.320.0030.00313.40
7.3.310.0000.00716.59
7.3.300.0030.00316.39
7.3.290.0070.00016.45
7.3.280.0030.01316.50
7.3.260.0100.01016.52
7.3.240.0100.00916.65
7.3.230.0130.00316.64
7.3.210.0060.01016.44
7.3.200.0060.01016.55
7.3.190.0090.00916.62
7.3.180.0130.00716.86
7.3.170.0070.01016.48
7.3.160.0160.00616.42
7.3.120.0030.01314.84
7.3.110.0090.00615.07
7.3.100.0070.00915.02
7.3.90.0070.01014.91
7.3.80.0030.00814.93
7.3.70.0100.00514.95
7.3.60.0030.00914.93
7.3.50.0050.00815.14
7.3.40.0100.00714.89
7.3.30.0050.01014.89
7.3.20.0090.00815.87
7.3.10.0110.00715.92
7.3.00.0060.00915.88
7.2.330.0070.01016.84
7.2.320.0040.01317.00
7.2.310.0100.01316.82
7.2.300.0100.00716.79
7.2.290.0100.00716.94
7.2.250.0070.01115.27
7.2.240.0020.01415.18
7.2.230.0080.00715.27
7.2.220.0050.00815.18
7.2.210.0010.01315.17
7.2.200.0030.01115.07
7.2.190.0070.01015.19
7.2.180.0100.00415.18
7.2.170.0110.00515.38
7.2.160.0110.00415.19
7.2.150.0090.01215.26
7.2.140.0110.01115.39
7.2.130.0100.00615.36
7.2.120.0030.01215.09
7.2.110.0090.00915.39
7.2.100.0030.01415.29
7.2.90.0070.01015.25
7.2.80.0060.01615.53
7.2.70.0070.01514.96
7.2.60.0120.00914.86
7.2.50.0090.00915.44
7.2.40.0130.01015.18
7.2.30.0090.01215.36
7.2.20.0090.01215.07
7.2.10.0070.01415.22
7.2.00.0100.01015.02
7.1.330.0100.00415.08
7.1.320.0100.00514.73
7.1.310.0070.00714.96
7.1.300.0060.00915.05
7.1.290.0100.00815.04
7.1.280.0100.00514.98
7.1.270.0070.00515.09
7.1.260.0000.01315.05
7.1.250.0060.01113.97

preferences:
51.36 ms | 401 KiB | 5 Q