3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "{download='text for button'} HAHA! {download='test'}"; $download = '<a class="button">Download</a>'; $search = "{download}"; if (contains($string,$search)) $string=str_ireplace($search,$download,$string); preg_match_all("/{download='(.*?)'}/", $string, $matches, PREG_SET_ORDER); foreach ($matches as $val) { $string = str_replace("{download='" . $val[1] . "'}", "<a class=\"button\">" . $val[1] . "</a>", $string); }

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.0190.00018.27
8.3.50.0110.00821.27
8.3.40.0100.00718.83
8.3.30.0100.00320.25
8.3.20.0050.00220.23
8.3.10.0000.00822.09
8.3.00.0040.00422.25
8.2.180.0040.01216.63
8.2.170.0070.01022.96
8.2.160.0100.01022.13
8.2.150.0000.00924.18
8.2.140.0050.00324.66
8.2.130.0120.00626.16
8.2.120.0040.00420.94
8.2.110.0030.00622.15
8.2.100.0100.00317.78
8.2.90.0040.00419.17
8.2.80.0080.00019.32
8.2.70.0030.00617.50
8.2.60.0000.00818.04
8.2.50.0000.00818.07
8.2.40.0000.00718.03
8.2.30.0040.00419.44
8.2.20.0040.00417.54
8.2.10.0030.00517.74
8.2.00.0040.00417.79
8.1.280.0140.00325.92
8.1.270.0000.00823.99
8.1.260.0000.00726.35
8.1.250.0040.01128.09
8.1.240.0030.00723.96
8.1.230.0100.00019.05
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0050.00317.42
8.1.180.0080.00019.01
8.1.170.0040.00418.45
8.1.160.0040.00418.79
8.1.150.0030.00618.63
8.1.140.0050.00217.35
8.1.130.0000.00717.79
8.1.120.0040.00417.39
8.1.110.0030.00317.29
8.1.100.0040.00417.38
8.1.90.0030.00417.41
8.1.80.0030.00317.28
8.1.70.0050.00317.39
8.1.60.0000.00817.51
8.1.50.0040.00417.43
8.1.40.0040.00417.43
8.1.30.0000.00717.51
8.1.20.0000.00817.55
8.1.10.0060.00317.45
8.1.00.0040.00417.54
8.0.300.0030.00618.77
8.0.290.0070.00017.04
8.0.280.0030.00318.29
8.0.270.0030.00517.11
8.0.260.0030.00316.75
8.0.250.0030.00317.00
8.0.240.0000.00816.88
8.0.230.0030.00316.84
8.0.220.0030.00316.86
8.0.210.0000.00716.93
8.0.200.0080.00016.82
8.0.190.0000.00717.02
8.0.180.0040.00416.81
8.0.170.0050.00316.95
8.0.160.0050.00216.83
8.0.150.0000.00716.79
8.0.140.0040.00416.87
8.0.130.0050.00013.37
8.0.120.0000.00816.89
8.0.110.0030.00316.81
8.0.100.0070.00016.96
8.0.90.0050.00216.90
8.0.80.0090.00616.93
8.0.70.0000.00716.87
8.0.60.0000.00716.86
8.0.50.0000.00717.00
8.0.30.0090.00916.91
8.0.20.0080.01017.40
8.0.10.0040.00417.08
8.0.00.0120.00616.64
7.4.330.0030.00315.00
7.4.320.0000.00616.53
7.4.300.0030.00316.43
7.4.290.0000.00716.48
7.4.280.0000.00716.39
7.4.270.0080.00016.50
7.4.260.0030.00313.27
7.4.250.0030.00516.47
7.4.240.0010.00616.41
7.4.230.0000.00716.54
7.4.220.0100.00716.62
7.4.210.0060.01016.55
7.4.200.0040.00416.38
7.4.190.0070.00016.70
7.4.160.0100.00616.43
7.4.150.0110.00517.40
7.4.140.0080.01117.86
7.4.130.0050.01216.40
7.4.120.0110.00616.48
7.4.110.0070.01016.41
7.4.100.0060.01316.65
7.4.90.0070.01016.34
7.4.80.0030.01319.39
7.4.70.0100.00716.63
7.4.60.0100.00616.68
7.4.50.0000.00816.38
7.4.40.0090.00622.77
7.4.30.0090.00616.44
7.4.00.0100.00315.18
7.3.330.0000.00613.07
7.3.320.0030.00313.04
7.3.310.0040.00416.27
7.3.300.0030.00316.27
7.3.290.0150.00616.21
7.3.280.0120.00616.33
7.3.270.0030.01317.40
7.3.260.0130.00316.29
7.3.250.0080.00816.42
7.3.240.0030.01316.54
7.3.230.0120.00416.59
7.3.210.0080.00816.28
7.3.200.0120.00819.39
7.3.190.0130.01016.55
7.3.180.0090.00616.59
7.3.170.0080.01116.27
7.3.160.0080.00816.30
7.3.120.0030.01314.89
7.3.10.0040.00716.34
7.3.00.0040.01116.38
7.2.330.0030.01316.41
7.2.320.0110.01116.49
7.2.310.0100.00716.56
7.2.300.0170.00716.28
7.2.290.0100.00616.20
7.2.130.0070.00716.84
7.2.120.0040.00816.66
7.2.110.0100.00716.59
7.2.100.0100.00716.67
7.2.90.0060.00316.75
7.2.80.0070.00316.82
7.2.70.0030.01016.57
7.2.60.0110.00616.59
7.2.50.0000.01016.68
7.2.40.0000.01616.75
7.2.30.0110.00316.70
7.2.20.0090.00616.68
7.2.10.0070.00716.73
7.2.00.0080.00617.71
7.1.250.0060.00315.68
7.1.240.0080.00015.55
7.1.230.0030.00715.63
7.1.220.0060.00615.73
7.1.210.0060.00615.72
7.1.200.0030.00715.52
7.1.190.0030.01015.80
7.1.180.0040.01115.75
7.1.170.0120.00615.70
7.1.160.0000.01315.63
7.1.150.0030.01015.78
7.1.140.0100.00315.41
7.1.130.0030.00615.73
7.1.120.0070.00715.73
7.1.110.0080.00015.50
7.1.100.0010.00916.63
7.1.90.0070.00715.57
7.1.80.0030.00815.59
7.1.70.0030.00716.19
7.1.60.0050.01317.49
7.1.50.0050.01015.97
7.1.40.0060.00715.36
7.1.30.0030.00615.79
7.1.20.0070.00315.59
7.1.10.0040.01115.60
7.1.00.0050.02119.01
7.0.330.0060.00315.26
7.0.320.0030.00715.32
7.0.310.0070.00715.32
7.0.300.0120.00415.28
7.0.290.0090.00615.40
7.0.280.0040.00715.27
7.0.270.0030.01015.05
7.0.260.0040.00815.45
7.0.250.0060.00915.32
7.0.240.0000.01415.45
7.0.230.0030.01015.37
7.0.220.0090.00315.46
7.0.210.0040.00715.42
7.0.200.0000.01015.96
7.0.190.0030.01015.37
7.0.180.0070.00715.31
7.0.170.0040.00815.40
7.0.160.0000.01015.33
7.0.150.0070.00415.05
7.0.140.0050.04018.75
7.0.130.0060.00615.16
7.0.120.0100.00615.42
7.0.110.0000.01415.42
7.0.100.0100.00615.25
7.0.90.0070.00715.41
7.0.80.0100.04117.54
7.0.70.0100.03017.64
7.0.60.0470.04217.58
7.0.50.0330.04217.76
7.0.40.0090.03916.79
7.0.30.0050.05016.70
7.0.20.0080.04416.77
7.0.10.0070.04516.64
7.0.00.0020.04816.61
5.6.380.0070.00314.32
5.6.370.0030.00914.44
5.6.360.0100.00614.17
5.6.350.0060.00714.25
5.6.340.0000.01114.17
5.6.330.0070.01014.29
5.6.320.0060.00313.95
5.6.310.0090.00314.00
5.6.300.0110.00314.26
5.6.290.0120.00314.43
5.6.280.0050.03817.47
5.6.270.0080.00414.03
5.6.260.0070.00714.36
5.6.250.0090.00614.29
5.6.240.0080.00814.09
5.6.230.0060.04917.24
5.6.220.0000.05117.34
5.6.210.0100.03317.38
5.6.200.0030.05217.72
5.6.190.0080.04517.61
5.6.180.0120.03617.62
5.6.170.0040.04817.62
5.6.160.0100.03517.48
5.6.150.0100.03717.52
5.6.140.0150.03417.45
5.6.130.0080.04517.42
5.6.120.0100.04217.52
5.6.110.0040.03817.45
5.6.100.0020.05117.67
5.6.90.0080.04117.70
5.6.80.0060.02317.17
5.6.70.0030.04217.12
5.6.60.0070.03517.12
5.6.50.0020.04317.24
5.6.40.0100.03717.21
5.6.30.0100.03917.17
5.6.20.0120.03517.22
5.6.10.0080.04617.29
5.6.00.0050.04117.16
5.5.380.0000.00811.16
5.5.370.0030.04315.77
5.5.360.0080.03715.68
5.5.350.0100.02215.49
5.5.340.0080.03015.88
5.5.330.0050.04415.85
5.5.320.0080.03315.76
5.5.310.0140.03815.93
5.5.300.0090.03615.88
5.5.290.0050.04415.85
5.5.280.0050.04415.96
5.5.270.0050.04115.74
5.5.260.0100.04015.94
5.5.250.0050.04015.73
5.5.240.0100.04215.48
5.5.230.0020.04815.46
5.5.220.0030.03715.61
5.5.210.0090.03815.56
5.5.200.0060.03515.38
5.5.190.0030.04315.49
5.5.180.0100.04015.62
5.5.170.0070.00310.93
5.5.160.0070.03815.38
5.5.150.0080.03815.52
5.5.140.0140.03815.55
5.5.130.0070.02915.56
5.5.120.0050.03015.34
5.5.110.0020.03215.30
5.5.100.0080.04015.45
5.5.90.0030.04515.46
5.5.80.0050.03315.37
5.5.70.0060.04015.41
5.5.60.0080.03815.53
5.5.50.0090.03115.37
5.5.40.0120.02515.32
5.5.30.0040.04015.27
5.5.20.0080.03715.30
5.5.10.0090.04015.44
5.5.00.0080.02315.44
5.4.450.0070.04115.12
5.4.440.0070.03115.05
5.4.430.0080.04015.03
5.4.420.0020.04415.06
5.4.410.0100.03515.04
5.4.400.0120.03614.81
5.4.390.0030.04014.82
5.4.380.0060.02314.66
5.4.370.0020.03514.89
5.4.360.0050.03014.82
5.4.350.0030.04414.89
5.4.340.0070.03314.88
5.4.330.0040.00710.69
5.4.320.0070.03214.94
5.4.310.0020.03014.87
5.4.300.0070.03914.80
5.4.290.0060.03815.01
5.4.280.0050.04214.76
5.4.270.0020.02914.85
5.4.260.0050.04014.85
5.4.250.0030.04314.78
5.4.240.0050.04214.81
5.4.230.0070.03414.96
5.4.220.0020.04114.75
5.4.210.0060.02815.01
5.4.200.0120.03214.84
5.4.190.0050.02414.85
5.4.180.0080.04214.75
5.4.170.0000.04814.90
5.4.160.0030.03314.70
5.4.150.0070.03814.88
5.4.140.0050.03113.56
5.4.130.0030.03713.53
5.4.120.0050.03813.54
5.4.110.0000.04413.61
5.4.100.0040.04313.76
5.4.90.0050.03513.38
5.4.80.0080.03813.58
5.4.70.0090.02713.43
5.4.60.0020.04013.40
5.4.50.0080.03613.41
5.4.40.0030.04113.57
5.4.30.0030.03913.62
5.4.20.0070.04013.32
5.4.10.0140.03613.51
5.4.00.0050.03513.01
5.3.290.0060.04012.47
5.3.280.0060.04012.39
5.3.270.0030.04512.43
5.3.260.0080.02512.46
5.3.250.0050.02112.36
5.3.240.0070.04012.42
5.3.230.0020.02712.44
5.3.220.0020.03212.32
5.3.210.0050.03812.40
5.3.200.0030.04312.39
5.3.190.0030.02812.37
5.3.180.0070.04112.40
5.3.170.0070.02512.48
5.3.160.0040.03912.37
5.3.150.0030.02912.40
5.3.140.0050.04112.45
5.3.130.0080.03712.33
5.3.120.0030.04012.34
5.3.110.0090.02912.44
5.3.100.0030.04012.18
5.3.90.0010.02312.17
5.3.80.0070.02512.12
5.3.70.0030.02312.11
5.3.60.0000.04211.93
5.3.50.0080.03712.05
5.3.40.0040.02212.11
5.3.30.0030.04012.03
5.3.20.0050.01911.84
5.3.10.0040.02511.91
5.3.00.0020.01911.86
5.2.170.0080.02810.55
5.2.160.0060.03110.55
5.2.150.0030.01810.55
5.2.140.0030.02010.55
5.2.130.0000.02310.55
5.2.120.0020.01610.55
5.2.110.0020.02210.55
5.2.100.0100.02310.55
5.2.90.0020.02210.55
5.2.80.0090.01410.55
5.2.70.0060.02510.55
5.2.60.0060.01310.55
5.2.50.0030.01310.55
5.2.40.0020.01610.55
5.2.30.0090.03010.55
5.2.20.0020.01810.55
5.2.10.0030.01510.55
5.2.00.0030.01310.55
5.1.60.0020.01610.55
5.1.50.0050.01310.55
5.1.40.0060.01010.55
5.1.30.0030.01210.55
5.1.20.0030.01310.55
5.1.10.0040.01710.55
5.1.00.0060.02010.55
5.0.50.0040.01710.55
5.0.40.0070.00810.55
5.0.30.0000.01910.55
5.0.20.0020.01710.55
5.0.10.0020.02610.55
5.0.00.0030.01610.55
4.4.90.0020.00910.55
4.4.80.0020.01010.55
4.4.70.0030.00810.55
4.4.60.0000.01010.55
4.4.50.0020.00810.55
4.4.40.0000.01510.55
4.4.30.0000.01010.55
4.4.20.0030.01810.55
4.4.10.0030.02010.55
4.4.00.0020.01410.55
4.3.110.0000.02210.55
4.3.100.0030.01710.55
4.3.90.0000.01010.55
4.3.80.0020.03010.55
4.3.70.0030.00810.55
4.3.60.0010.00910.55
4.3.50.0010.00910.55
4.3.40.0000.01510.55
4.3.30.0030.01010.55
4.3.20.0030.00810.55
4.3.10.0000.01010.55
4.3.00.0000.01010.55

preferences:
37.05 ms | 401 KiB | 5 Q