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_'; echo _format_special_tags($html,$sub); 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; }

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.0130.00716.75
8.3.50.0140.00822.00
8.3.40.0070.01018.83
8.3.30.0100.00319.02
8.3.20.0040.00420.43
8.3.10.0050.00323.61
8.3.00.0000.00819.25
8.2.180.0130.00918.16
8.2.170.0180.00322.96
8.2.160.0070.00720.52
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0150.00326.16
8.2.120.0040.00422.26
8.2.110.0060.00320.51
8.2.100.0080.00417.67
8.2.90.0040.00419.30
8.2.80.0030.00517.97
8.2.70.0030.00617.63
8.2.60.0030.00618.04
8.2.50.0040.00418.07
8.2.40.0040.00419.88
8.2.30.0000.00919.97
8.2.20.0070.00017.77
8.2.10.0000.00718.31
8.2.00.0060.00317.95
8.1.280.0070.00725.92
8.1.270.0030.00624.02
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0070.00323.77
8.1.230.0070.00424.03
8.1.220.0060.00317.91
8.1.210.0000.00818.77
8.1.200.0090.00317.35
8.1.190.0000.00817.25
8.1.180.0000.00919.01
8.1.170.0030.00518.63
8.1.160.0070.00022.00
8.1.150.0100.00018.66
8.1.140.0040.00417.50
8.1.130.0000.00717.89
8.1.120.0050.00217.56
8.1.110.0000.00817.50
8.1.100.0000.00717.57
8.1.90.0000.00817.54
8.1.80.0000.00717.37
8.1.70.0000.00717.49
8.1.60.0060.00317.68
8.1.50.0080.00017.61
8.1.40.0080.00017.51
8.1.30.0030.00517.63
8.1.20.0000.00817.63
8.1.10.0040.00417.67
8.1.00.0040.00417.57
8.0.300.0000.00918.77
8.0.290.0040.00716.63
8.0.280.0030.00318.49
8.0.270.0040.00417.23
8.0.260.0030.00317.33
8.0.250.0030.00317.03
8.0.240.0060.00017.06
8.0.230.0030.00316.98
8.0.220.0040.00416.86
8.0.210.0040.00416.89
8.0.200.0030.00317.00
8.0.190.0000.00817.02
8.0.180.0070.00017.02
8.0.170.0040.00416.87
8.0.160.0070.00016.91
8.0.150.0000.00716.98
8.0.140.0000.00716.97
8.0.130.0000.00513.37
8.0.120.0080.00016.88
8.0.110.0040.00416.96
8.0.100.0040.00417.07
8.0.90.0030.00316.75
8.0.80.0070.01416.90
8.0.70.0030.00517.02
8.0.60.0030.00517.02
8.0.50.0070.00016.88
8.0.30.0170.00717.00
8.0.20.0070.01117.40
8.0.10.0070.00017.06
8.0.00.0110.00616.76
7.4.330.0000.00515.10
7.4.320.0000.00716.71
7.4.300.0030.00316.69
7.4.290.0040.00416.51
7.4.280.0030.00616.47
7.4.270.0030.00516.56
7.4.260.0060.00016.54
7.4.250.0000.00816.52
7.4.240.0020.00516.58
7.4.230.0030.00316.46
7.4.220.0070.01316.65
7.4.210.0110.00716.56
7.4.200.0030.00316.60
7.4.190.0030.00516.75
7.4.160.0130.00316.38
7.4.150.0070.01017.40
7.4.140.0100.01017.86
7.4.130.0060.01216.70
7.4.120.0060.01116.56
7.4.110.0060.01316.46
7.4.100.0150.00316.59
7.4.90.0130.00316.42
7.4.80.0040.01419.39
7.4.70.0120.00916.60
7.4.60.0080.00816.56
7.4.50.0080.00016.49
7.4.40.0030.00922.77
7.4.30.0160.00016.53
7.4.00.0070.00915.04
7.3.330.0060.00013.48
7.3.320.0000.00513.36
7.3.310.0040.00416.26
7.3.300.0000.00716.42
7.3.290.0040.01116.42
7.3.280.0090.01016.33
7.3.270.0060.01317.40
7.3.260.0090.00916.61
7.3.250.0120.00816.40
7.3.240.0060.01016.46
7.3.230.0100.00716.52
7.3.210.0130.00616.55
7.3.200.0130.00316.47
7.3.190.0040.01516.62
7.3.180.0130.00316.39
7.3.170.0080.00816.49
7.3.160.0140.00516.32
7.3.120.0070.01014.80
7.3.110.0100.00614.85
7.3.100.0060.00814.77
7.3.90.0040.00715.01
7.3.80.0100.00315.13
7.3.70.0060.01014.62
7.3.60.0120.00314.73
7.3.50.0080.00414.54
7.3.40.0070.00714.78
7.3.30.0040.01115.00
7.3.20.0090.00616.42
7.3.10.0070.01316.69
7.3.00.0040.01516.67
7.2.330.0040.01516.88
7.2.320.0070.01016.32
7.2.310.0120.00616.52
7.2.300.0100.00616.85
7.2.290.0100.00616.69
7.2.250.0040.01415.11
7.2.240.0030.01715.10
7.2.230.0080.00815.29
7.2.220.0030.01215.16
7.2.210.0050.00515.00
7.2.200.0060.00915.05
7.2.190.0030.01115.09
7.2.180.0100.00314.92
7.2.170.0060.01015.23
7.2.00.0080.00419.50
7.1.330.0090.00615.91
7.1.320.0030.01416.09
7.1.310.0000.00915.96
7.1.300.0000.01615.54
7.1.290.0040.00715.59
7.1.280.0030.01015.86
7.1.270.0070.01115.52
7.1.260.0060.00615.61
7.1.200.0000.01415.98
7.1.100.0030.00918.29
7.1.70.0090.00017.21
7.1.60.0060.01919.46
7.1.50.0160.00634.89
7.1.00.0070.08722.41
7.0.200.0030.00616.46
7.0.140.0030.07322.07
7.0.60.0070.06020.05
7.0.50.0100.08017.88
7.0.40.0030.05320.16
7.0.30.0570.05720.19
7.0.20.0170.04020.10
7.0.10.0330.07020.15
7.0.00.0030.06320.07
5.6.280.0070.09021.13
5.6.210.0070.03720.47
5.6.200.0070.07318.18
5.6.190.0030.04320.52
5.6.180.0230.06020.52
5.6.170.0300.07020.54
5.6.160.0130.06320.39
5.6.150.0070.06318.19
5.6.140.0100.07718.18
5.6.130.0070.04718.16
5.6.120.0030.04021.00
5.6.110.0000.04321.12
5.6.100.0000.04721.12
5.6.90.0100.08321.01
5.6.80.0100.06320.38
5.6.70.4430.04320.39
5.5.350.0070.08020.42
5.5.340.0170.07017.97
5.5.330.0130.08020.21
5.5.320.0400.08020.42
5.5.310.0230.04720.34
5.5.300.0170.06717.97
5.5.290.0170.07017.95
5.5.280.0070.09020.81
5.5.270.0070.08320.84
5.5.260.0100.08320.87
5.5.250.0000.04320.62
5.5.240.0070.06020.17
5.4.450.0600.06019.35
5.4.440.0600.06019.45
5.4.430.0770.08019.56
5.4.420.0170.05019.59
5.4.410.0700.04319.34
5.4.400.0300.05019.29
5.4.390.0300.06318.84
5.4.380.0430.07318.78
5.4.370.0300.05318.53
5.4.360.0700.05718.74
5.4.350.0430.05018.84
5.4.340.0200.07018.80
5.4.320.0080.03412.51
5.4.310.0040.03912.50
5.4.300.0040.04112.52
5.4.290.0070.04112.49
5.4.280.0070.03512.39
5.4.270.0070.03512.39
5.4.260.0030.04012.39
5.4.250.0050.03912.39
5.4.240.0050.04512.39
5.4.230.0070.03912.38
5.4.220.0080.03512.38
5.4.210.0060.03512.39
5.4.200.0080.04512.38
5.4.190.0100.03312.38
5.4.180.0070.04512.38
5.4.170.0090.03712.38
5.4.160.0070.03912.38
5.4.150.0060.04112.38
5.4.140.0050.03712.06
5.4.130.0100.04012.05
5.4.120.0050.03712.01
5.4.110.0050.04712.01
5.4.100.0030.03812.01
5.4.90.0100.03512.00
5.4.80.0050.03712.00
5.4.70.0100.03612.00
5.4.60.0060.04012.00
5.4.50.0050.03712.00
5.4.40.0050.03611.99
5.4.30.0060.03811.98
5.4.20.0050.03911.98
5.4.10.0040.03711.99
5.4.00.0060.03511.48
5.3.290.0050.04012.80
5.3.280.0090.03612.71
5.3.270.0070.03912.72
5.3.260.0070.03912.72
5.3.250.0080.03612.72
5.3.240.0050.04012.72
5.3.230.0080.03612.71
5.3.220.0060.04512.68
5.3.210.0100.04512.68
5.3.200.0070.03612.68
5.3.190.0090.03612.68
5.3.180.0110.03712.67
5.3.170.0040.04012.67
5.3.160.0040.04612.67
5.3.150.0060.03912.67
5.3.140.0080.03412.66
5.3.130.0040.04112.66
5.3.120.0090.04612.66
5.3.110.0050.04412.65
5.3.100.0080.03912.13
5.3.90.0120.03712.11
5.3.80.0090.03612.10
5.3.70.0060.03912.10
5.3.60.0090.04012.09
5.3.50.0050.04212.03
5.3.40.0120.03212.04
5.3.30.0050.03811.99
5.3.20.0100.03511.77
5.3.10.0080.03411.73
5.3.00.0050.03911.71
5.2.170.0070.0299.23
5.2.160.0030.0319.23
5.2.150.0070.0389.23
5.2.140.0100.0329.22
5.2.130.0040.0309.18
5.2.120.0060.0349.19
5.2.110.0050.0319.19
5.2.100.0050.0389.19
5.2.90.0050.0369.19
5.2.80.0060.0299.18
5.2.70.0070.0309.18
5.2.60.0040.0329.14
5.2.50.0040.0359.11
5.2.40.0030.0319.09
5.2.30.0020.0339.05
5.2.20.0050.0309.04
5.2.10.0070.0278.95
5.2.00.0050.0328.82
5.1.60.0070.0278.10
5.1.50.0030.0308.09
5.1.40.0050.0248.07
5.1.30.0070.0248.42
5.1.20.0050.0268.44
5.1.10.0080.0268.18
5.1.00.0030.0318.18
5.0.50.0030.0216.66
5.0.40.0050.0246.52
5.0.30.0060.0326.33
5.0.20.0040.0206.30
5.0.10.0020.0226.28
5.0.00.0040.0316.27
4.4.90.0020.0174.78
4.4.80.0010.0184.75
4.4.70.0030.0194.76
4.4.60.0020.0184.75
4.4.50.0030.0174.77
4.4.40.0070.0254.71
4.4.30.0060.0134.76
4.4.20.0010.0174.85
4.4.10.0070.0174.84
4.4.00.0060.0264.76
4.3.110.0060.0194.67
4.3.100.0040.0154.67
4.3.90.0030.0174.64
4.3.80.0020.0254.58
4.3.70.0020.0154.63
4.3.60.0020.0154.63
4.3.50.0000.0234.62
4.3.40.0040.0234.54
4.3.30.0030.0163.33
4.3.20.0020.0173.30
4.3.10.0020.0163.26
4.3.00.0200.01310.54

preferences:
58.64 ms | 401 KiB | 5 Q