3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<!--HEAD--><p class="listing-grp-title">Top Ranked Offers</p><!--HEAD--> <!--WRAPPERSTART--><div><table><!--WRAPPERSTART--> <tr class="{% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}"> <td class="rank">&#35; {{forloop.counter}}</td> <td class="logo"> <img src="{{ad.display_url}}" width="120" height="40" alt="Aig Sml"/> </td> <td> <p class="offer">{{ad.headline}}</p> {{ad.body|safe}} </td> <td> <img src="images/arrow.png" width="14" height="18" alt=""/> </td> <td class="end"> <a href="#"><img class="button" src="images/sml-btn.png" width="112" height="30" alt=""/></a> </td> </tr> <!--WRAPPEREND--></table></div><!--WRAPPEREND-->'; $sub= 'sub_0_'; $htmlp = _format_special_tags($html,$sub); _remove_between('<!--HEAD-->',$htmlp); function _format_special_tags($html,$sub) { //where sub is sub_1_ or similar $tags = array(); $outer= "{% if forloop.counter = ".$sub."range.0 %}"; $end_outer = "{% endif %}"; $header = _return_between('<!--HEAD-->',$html); $wrapper_start = _return_between('<!--WRAPPERSTART-->',$html); $wrapper_end = _return_between('<!--WRAPPEREND-->',$html); $html = $outer.(($header)?$header:'').(($wrapper_start)?$wrapper_start:'').$end_outer.$html.$outer.(($wrapper_end)?$wrapper_end:'').$end_outer; return $html; } function _return_between($tag,$subject) { $split = explode($tag,$subject,3); return (isset($split[1]))?$split[1]:false; } function _remove_between($tag,$subject) { echo preg_replace("/".$tag.".+?".$tag."/i", "", $subject); }

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.0000.01516.98
8.3.50.0100.01222.05
8.3.40.0100.00719.01
8.3.30.0100.00318.79
8.3.20.0070.00020.20
8.3.10.0080.00023.51
8.3.00.0030.00619.63
8.2.180.0090.00618.55
8.2.170.0120.00322.96
8.2.160.0100.00320.54
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00419.10
8.2.110.0060.00322.13
8.2.100.0080.00318.03
8.2.90.0000.00819.34
8.2.80.0040.00417.97
8.2.70.0090.00017.88
8.2.60.0080.00018.16
8.2.50.0080.00018.07
8.2.40.0090.00020.20
8.2.30.0020.00519.81
8.2.20.0000.00717.92
8.2.10.0000.00818.30
8.2.00.0070.00317.92
8.1.280.0140.00025.92
8.1.270.0060.00323.79
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.98
8.1.230.0070.00419.27
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0000.01017.47
8.1.190.0030.00617.52
8.1.180.0100.00019.13
8.1.170.0080.00318.63
8.1.160.0000.00822.09
8.1.150.0090.00318.74
8.1.140.0040.00417.69
8.1.130.0040.00417.88
8.1.120.0040.00417.68
8.1.110.0020.00517.63
8.1.100.0000.00717.61
8.1.90.0040.00417.57
8.1.80.0000.00817.67
8.1.70.0000.00717.53
8.1.60.0040.00417.67
8.1.50.0090.00017.66
8.1.40.0040.00417.71
8.1.30.0040.00417.64
8.1.20.0040.00417.89
8.1.10.0000.00717.65
8.1.00.0000.00817.67
8.0.300.0040.00419.02
8.0.290.0070.00017.18
8.0.280.0030.00318.41
8.0.270.0000.00717.36
8.0.260.0030.00317.43
8.0.250.0030.00317.05
8.0.240.0000.00817.14
8.0.230.0000.00717.05
8.0.220.0070.00017.06
8.0.210.0030.00517.04
8.0.200.0030.00317.02
8.0.190.0030.00617.07
8.0.180.0000.00817.16
8.0.170.0000.00817.03
8.0.160.0020.00516.96
8.0.150.0040.00416.91
8.0.140.0000.00716.95
8.0.130.0000.00613.59
8.0.120.0030.00516.97
8.0.110.0050.00217.05
8.0.100.0040.00416.95
8.0.90.0040.00416.98
8.0.80.0060.00916.96
8.0.70.0070.00016.99
8.0.60.0000.00717.13
8.0.50.0040.00417.08
8.0.30.0060.01317.33
8.0.20.0130.00517.42
8.0.10.0000.00716.93
8.0.00.0050.01217.10
7.4.330.0030.00315.00
7.4.320.0030.00316.78
7.4.300.0000.00616.73
7.4.290.0040.00416.74
7.4.280.0040.00716.84
7.4.270.0000.00716.84
7.4.260.0030.00316.82
7.4.250.0000.00816.61
7.4.240.0000.00716.81
7.4.230.0040.00416.70
7.4.220.0140.00416.80
7.4.210.0080.00616.79
7.4.200.0030.00316.88
7.4.190.0000.00716.78
7.4.160.0160.00616.64
7.4.150.0120.00617.40
7.4.140.0090.00917.86
7.4.130.0060.01016.72
7.4.120.0060.01116.69
7.4.110.0120.00616.64
7.4.100.0170.00316.68
7.4.90.0090.00916.64
7.4.80.0070.01719.39
7.4.70.0130.00316.75
7.4.60.0110.00616.84
7.4.50.0000.00916.78
7.4.40.0040.01522.77
7.4.30.0060.01016.90
7.4.00.0060.00815.15
7.3.330.0020.00213.55
7.3.320.0030.00313.42
7.3.310.0000.00716.60
7.3.300.0030.00316.56
7.3.290.0140.00616.48
7.3.280.0070.00816.55
7.3.270.0130.00417.40
7.3.260.0070.01516.73
7.3.250.0120.00616.65
7.3.240.0060.00916.58
7.3.230.0130.00416.55
7.3.210.0160.00616.50
7.3.200.0100.01019.39
7.3.190.0100.01316.68
7.3.180.0090.00616.51
7.3.170.0110.00416.76
7.3.160.0060.01116.75
7.3.120.0070.01014.87
7.3.110.0040.01414.68
7.3.100.0120.00315.01
7.3.90.0070.00315.23
7.3.80.0000.01114.79
7.3.70.0060.00615.02
7.3.60.0070.00315.09
7.3.50.0070.01014.68
7.3.40.0030.00715.16
7.3.30.0040.01215.22
7.3.20.0040.00416.82
7.3.10.0070.00316.80
7.3.00.0030.00817.03
7.2.330.0120.00916.93
7.2.320.0130.00416.73
7.2.310.0120.00916.89
7.2.300.0040.01216.89
7.2.290.0030.01716.98
7.2.250.0090.00914.98
7.2.240.0070.01015.47
7.2.230.0030.00715.50
7.2.220.0080.00315.39
7.2.210.0100.00715.38
7.2.200.0060.00915.45
7.2.190.0070.00714.88
7.2.180.0000.01515.05
7.2.170.0080.00415.22
7.2.00.0070.00719.42
7.1.330.0030.00916.09
7.1.320.0050.00516.02
7.1.310.0030.01016.05
7.1.300.0120.00015.77
7.1.290.0030.00715.89
7.1.280.0080.00015.71
7.1.270.0060.00615.93
7.1.260.0030.00915.82
7.1.100.0090.00617.99
7.1.70.0020.00717.51
7.1.60.0070.01719.46
7.1.50.0130.01035.03
7.1.00.0030.07722.42
7.0.200.0030.00616.77
7.0.140.0000.07721.98
7.0.60.0000.04319.95
7.0.50.0100.05017.97
7.0.40.0100.03720.06
7.0.30.0200.06020.30
7.0.20.0200.03720.27
7.0.10.0030.09720.17
7.0.00.0100.07720.09
5.6.280.0070.07021.16
5.6.210.0030.08320.70
5.6.200.0130.07718.27
5.6.190.0100.07720.41
5.6.180.0100.06020.73
5.6.170.0230.05020.45
5.6.160.0100.08020.54
5.6.150.0000.04718.15
5.6.140.0070.08318.15
5.6.130.0070.08018.18
5.6.120.0030.05321.13
5.6.110.0070.05720.96
5.6.100.0030.09321.09
5.6.90.0130.06020.88
5.6.80.0070.06320.52
5.5.350.0230.04020.48
5.5.340.0100.03017.95
5.5.330.0100.08320.31
5.5.320.0030.06320.30
5.5.310.0270.04320.34
5.5.300.0070.08318.07
5.5.290.0100.03318.07
5.5.280.0070.09020.78
5.5.270.0030.05320.80
5.5.260.0100.07320.73
5.5.250.0070.07320.72
5.5.240.0300.07020.23
5.4.450.0630.06019.55
5.4.440.0670.06719.60
5.4.430.0570.05319.60
5.4.420.0300.04019.44
5.4.410.0470.06319.20
5.4.400.0430.06319.30
5.4.390.0100.05719.04
5.4.380.0400.05018.77
5.4.370.0430.05318.63
5.4.360.0230.06318.84
5.4.350.0530.04018.71
5.4.340.0300.06018.57
5.4.320.0040.03812.52
5.4.310.0050.03812.50
5.4.300.0050.03812.51
5.4.290.0070.04312.50
5.4.280.0080.04912.40
5.4.270.0040.03812.39
5.4.260.0070.03612.40
5.4.250.0030.04012.40
5.4.240.0100.03312.40
5.4.230.0090.04612.39
5.4.220.0100.04112.39
5.4.210.0050.04412.39
5.4.200.0100.04212.39
5.4.190.0080.03612.39
5.4.180.0070.03512.39
5.4.170.0040.03812.39
5.4.160.0050.03712.39
5.4.150.0080.03312.39
5.4.140.0040.03912.07
5.4.130.0080.03412.06
5.4.120.0050.03512.02
5.4.110.0040.03712.02
5.4.100.0030.03812.01
5.4.90.0090.03612.02
5.4.80.0060.03612.01
5.4.70.0050.03512.00
5.4.60.0060.04412.01
5.4.50.0040.04212.01
5.4.40.0050.03612.00
5.4.30.0050.03612.00
5.4.20.0070.03412.00
5.4.10.0040.03611.99
5.4.00.0060.04211.48
5.3.290.0030.04212.80
5.3.280.0080.03712.71
5.3.270.0040.04212.72
5.3.260.0070.03912.72
5.3.250.0030.04112.71
5.3.240.0070.03712.72
5.3.230.0070.03712.71
5.3.220.0080.03512.68
5.3.210.0030.04612.68
5.3.200.0100.03712.68
5.3.190.0050.04012.68
5.3.180.0090.03712.68
5.3.170.0080.03712.67
5.3.160.0070.04312.68
5.3.150.0050.03812.67
5.3.140.0040.03812.66
5.3.130.0120.03212.66
5.3.120.0060.03912.66
5.3.110.0090.03612.66
5.3.100.0080.03512.14
5.3.90.0060.03612.13
5.3.80.0070.04312.11
5.3.70.0050.04412.11
5.3.60.0080.03912.10
5.3.50.0070.03612.05
5.3.40.0080.04012.04
5.3.30.0050.04312.01
5.3.20.0090.03411.79
5.3.10.0050.03611.75
5.3.00.0040.03811.73
5.2.170.0070.0309.25
5.2.160.0080.0379.25
5.2.150.0040.0319.25
5.2.140.0050.0369.24
5.2.130.0070.0289.21
5.2.120.0060.0359.20
5.2.110.0050.0329.21
5.2.100.0070.0349.20
5.2.90.0050.0299.20
5.2.80.0080.0279.20
5.2.70.0090.0299.20
5.2.60.0070.0289.16
5.2.50.0060.0299.13
5.2.40.0050.0309.11
5.2.30.0070.0319.07
5.2.20.0060.0299.07
5.2.10.0050.0278.96
5.2.00.0070.0288.82
5.1.60.0050.0258.11
5.1.50.0060.0278.10
5.1.40.0050.0278.08
5.1.30.0030.0298.43
5.1.20.0050.0268.45
5.1.10.0050.0248.18
5.1.00.0030.0268.18
5.0.50.0060.0206.66
5.0.40.0060.0186.53
5.0.30.0060.0306.34
5.0.20.0060.0206.30
5.0.10.0040.0206.28
5.0.00.0030.0386.28
4.4.90.0030.0174.78
4.4.80.0010.0174.75
4.4.70.0050.0134.75
4.4.60.0020.0164.75
4.4.50.0040.0144.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0030.0184.85
4.4.10.0050.0154.85
4.4.00.0040.0244.76
4.3.110.0040.0164.67
4.3.100.0030.0194.67
4.3.90.0020.0184.63
4.3.80.0030.0284.59
4.3.70.0030.0164.63
4.3.60.0040.0174.63
4.3.50.0030.0154.63
4.3.40.0020.0264.54
4.3.30.0010.0173.33
4.3.20.0020.0183.30
4.3.10.0020.0153.27
4.3.00.0000.04010.54

preferences:
45.84 ms | 401 KiB | 5 Q