3v4l.org

run code in 300+ PHP versions simultaneously
<?php $blocks = [ 'header' => ['html' => '<header>%s</header>'], 'body' => ['html' => '<div>%s</div>'], 'footer' => ['html' => '<footer>%s</footer>'] ]; $elems = [ ]; $json = json_decode('{"header":[{"type":"background","data":{"src":"https://s3-eu-west-1.amazonaws.com/ptfl/panorama/517e910005dd01e736000005.jpg"}},{"type":"title","data":[{"type":"link","data":{"text":"WeDo","href":"http://dev.dotoknow.com/project/view/517e8bcd05dd018f3b00000e"}}]}],"body":[{"type":"post","data":{"text":["DoToKnow is a project like any other. And alike many other projects it is an ongoing process of discussing, building, developing and fine-tuning. On this page we will keep you up to date on any news and features of DoToKnow.","We would like to ask you to stay on-topic within the posts. If you have any questions, have a look at our About or FAQ pages. If they don\'t provide you with the necessary information you can always contact us through feedback@dotoknow.com"],"project":"517e8bcd05dd018f3b00000e","post":0}}],"footer":[{"type":"tags","data":{"text":["DoToKnow","Official Project","News Channel","Developer blog"]}}]}'); $html = ''; foreach($json as $key => $block) { $html .= $blocks[$key]->html; } print $html;

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.0110.00416.63
8.3.50.0110.00721.91
8.3.40.0110.00418.96
8.3.30.0070.00719.04
8.3.20.0030.00520.07
8.3.10.0000.01223.61
8.3.00.0000.00819.63
8.2.180.0090.00618.66
8.2.170.0090.00922.96
8.2.160.0070.00720.37
8.2.150.0000.00824.18
8.2.140.0110.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00019.83
8.2.110.0050.00522.11
8.2.100.0090.00317.91
8.2.90.0080.00019.21
8.2.80.0050.00517.97
8.2.70.0060.00317.63
8.2.60.0050.00318.03
8.2.50.0040.00818.07
8.2.40.0080.00020.01
8.2.30.0000.00818.18
8.2.20.0050.00317.90
8.2.10.0050.00218.19
8.2.00.0000.00717.75
8.1.280.0130.00325.92
8.1.270.0090.00023.61
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.92
8.1.230.0070.00419.00
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0090.00017.36
8.1.190.0050.00217.22
8.1.180.0060.00318.10
8.1.170.0050.00318.71
8.1.160.0050.00222.08
8.1.150.0040.00418.75
8.1.140.0020.00517.34
8.1.130.0000.00717.75
8.1.120.0070.00017.48
8.1.110.0040.00417.38
8.1.100.0030.00317.45
8.1.90.0000.00717.35
8.1.80.0060.00317.36
8.1.70.0000.00717.34
8.1.60.0000.00817.61
8.1.50.0040.00417.57
8.1.40.0070.00017.42
8.1.30.0080.00017.62
8.1.20.0040.00417.66
8.1.10.0040.00417.59
8.1.00.0050.00217.56
8.0.300.0070.00020.77
8.0.290.0040.00417.05
8.0.280.0000.00718.44
8.0.270.0030.00317.22
8.0.260.0030.00317.18
8.0.250.0000.00816.96
8.0.240.0040.00417.05
8.0.230.0040.00417.03
8.0.220.0000.00616.99
8.0.210.0000.00716.95
8.0.200.0030.00317.09
8.0.190.0000.00816.89
8.0.180.0070.00017.02
8.0.170.0080.00017.00
8.0.160.0030.00316.88
8.0.150.0040.00416.98
8.0.140.0000.00716.88
8.0.130.0030.00313.39
8.0.120.0000.00816.86
8.0.110.0030.00516.78
8.0.100.0000.00716.95
8.0.90.0020.00517.01
8.0.80.0060.00916.95
8.0.70.0080.00016.83
8.0.60.0040.00416.95
8.0.50.0000.00716.91
8.0.30.0080.01017.13
8.0.20.0120.00917.40
8.0.10.0070.00016.95
8.0.00.0120.01016.68
7.4.330.0020.00215.00
7.4.320.0000.00616.56
7.4.300.0030.00316.52
7.4.290.0000.00816.44
7.4.280.0040.00416.52
7.4.270.0000.00816.52
7.4.260.0030.00316.52
7.4.250.0040.00416.40
7.4.240.0050.00216.55
7.4.230.0040.00316.52
7.4.220.0090.00916.54
7.4.210.0070.00816.54
7.4.200.0070.00016.64
7.4.190.0070.00016.76
7.4.160.0090.00616.45
7.4.150.0120.00617.40
7.4.140.0100.00717.86
7.4.130.0080.01016.57
7.4.120.0120.00516.63
7.4.110.0070.01416.48
7.4.100.0100.00916.54
7.4.90.0110.00616.59
7.4.80.0110.00919.39
7.4.70.0150.00816.35
7.4.60.0140.00216.60
7.4.50.0070.00016.67
7.4.40.0120.01116.55
7.4.30.0040.01116.44
7.4.00.0110.00314.65
7.3.330.0030.00313.09
7.3.320.0000.00513.02
7.3.310.0030.00316.43
7.3.300.0070.00016.33
7.3.290.0040.01116.34
7.3.280.0070.01316.37
7.3.270.0090.00917.40
7.3.260.0040.01416.44
7.3.250.0070.01816.48
7.3.240.0110.01216.50
7.3.230.0100.01016.44
7.3.210.0060.01416.58
7.3.200.0060.01219.39
7.3.190.0140.00816.66
7.3.180.0100.00916.50
7.3.170.0090.00616.41
7.3.160.0100.00616.35
7.3.120.0030.00915.06
7.3.00.0180.00316.12
7.2.330.0120.01216.48
7.2.320.0000.01616.88
7.2.310.0140.00316.66
7.2.300.0110.00716.53
7.2.290.0080.00816.77
7.2.130.0040.01216.54
7.2.120.0160.00616.46
7.2.110.0130.00716.46
7.2.100.0110.01116.66
7.2.90.0150.00616.61
7.2.80.0130.00716.32
7.2.70.0050.01616.34
7.2.60.0150.00616.74
7.2.50.0110.01416.55
7.2.40.0180.00916.46
7.2.30.0170.00916.38
7.2.20.0160.01016.71
7.2.10.0100.00616.64
7.2.00.0110.00717.92
7.1.250.0110.00715.57
7.1.240.0090.00315.18
7.1.230.0110.00915.64
7.1.220.0090.00915.46
7.1.210.0150.00315.42
7.1.200.0050.01015.66
7.1.190.0130.00715.26
7.1.180.0210.00415.15
7.1.170.0070.01115.35
7.1.160.0110.01115.37
7.1.150.0130.00815.60
7.1.140.0140.00715.14
7.1.130.0070.01015.29
7.1.120.0170.00315.07
7.1.110.0100.00715.61
7.1.100.0030.01116.72
7.1.90.0110.00715.60
7.1.80.0150.00615.25
7.1.70.0060.01016.41
7.1.60.0160.00517.48
7.1.50.0100.01116.16
7.1.40.0160.00315.64
7.1.30.0090.00615.57
7.1.20.0060.00615.72
7.1.10.0100.00715.59
7.1.00.0100.03918.86
7.0.330.0130.00315.25
7.0.320.0100.00614.95
7.0.310.0110.00714.98
7.0.300.0130.00715.07
7.0.290.0030.01015.21
7.0.280.0160.00314.80
7.0.270.0070.00715.14
7.0.260.0070.00714.86
7.0.250.0070.01115.14
7.0.240.0100.00715.02
7.0.230.0100.00315.03
7.0.220.0070.00715.31
7.0.210.0100.00315.15
7.0.200.0180.00314.91
7.0.190.0080.01215.09
7.0.180.0120.00015.37
7.0.170.0130.00315.25
7.0.160.0070.00715.37
7.0.150.0110.00415.18
7.0.140.0070.03718.70
7.0.130.0040.00815.28
7.0.120.0060.01014.93
7.0.110.0080.00615.46
7.0.100.0130.00314.98
7.0.90.0120.00615.10
7.0.80.0070.01315.10
7.0.70.0030.01014.97
7.0.60.0160.03817.52
7.0.50.0090.03116.47
7.0.40.0070.04416.79
7.0.30.0140.02616.56
7.0.20.0160.03616.69
7.0.10.0050.03916.60
7.0.00.0080.02516.79
5.6.380.0070.01014.50
5.6.370.0000.01414.48
5.6.360.0000.00913.97
5.6.350.0100.00714.39
5.6.340.0120.00614.39
5.6.330.0040.00814.31
5.6.320.0100.00314.28
5.6.310.0040.00414.27
5.6.300.0030.01213.91
5.6.290.0030.00914.37
5.6.280.0080.03617.56
5.6.270.0070.00414.36
5.6.260.0070.00713.98
5.6.250.0050.01013.86
5.6.240.0040.01314.12
5.6.230.0120.00614.30
5.6.220.0070.01314.24
5.6.210.0100.04217.17
5.6.200.0110.04016.05
5.6.190.0070.02317.25
5.6.180.0230.02517.19
5.6.170.0270.04017.19
5.6.160.0110.04217.25
5.6.150.0100.01815.89
5.6.140.0140.03416.11
5.6.130.0110.02716.25
5.6.120.0060.02317.56
5.6.110.0100.03017.44
5.6.100.0110.03017.35
5.6.90.0130.04017.48
5.6.80.0130.04217.06
5.6.70.0080.00413.73
5.6.60.0000.01413.58
5.6.50.0070.00713.77
5.6.40.0030.01113.98
5.6.30.0060.00614.01
5.6.20.0000.01213.95
5.6.10.0070.00213.91
5.6.00.0130.00313.77
5.5.380.0000.01111.18
5.5.370.0030.00611.18
5.5.360.0130.00011.18
5.5.350.0050.04115.80
5.5.340.0050.04214.64
5.5.330.0050.04615.82
5.5.320.0180.03715.77
5.5.310.0130.02315.75
5.5.300.0060.02514.57
5.5.290.0080.04414.65
5.5.280.0050.02215.93
5.5.270.0030.02516.07
5.5.260.0080.03316.00
5.5.250.0130.01815.88
5.5.240.2090.02115.68
5.5.230.0030.00311.18
5.5.220.0030.00611.18
5.5.210.0040.00411.18
5.5.200.0050.00211.18
5.5.190.0060.00311.18
5.5.180.0050.00311.18
5.5.170.0040.00411.18
5.5.160.0050.00311.18
5.5.150.0000.00811.18
5.5.140.0030.00611.18
5.5.130.0030.00611.18
5.5.120.0000.00711.18
5.5.110.0000.00811.18
5.5.100.0060.00611.18
5.5.90.0000.01111.18
5.5.80.0000.01011.18
5.5.70.0110.00011.18
5.5.60.0060.00311.29
5.5.50.0070.00311.18
5.5.40.0070.00011.18
5.5.30.0040.00411.18
5.5.20.0060.00311.18
5.5.10.0000.01111.18
5.5.00.0070.00411.18
5.4.450.0350.04815.38
5.4.440.0500.02615.21
5.4.430.0410.02615.37
5.4.420.0370.03515.40
5.4.410.0450.03015.16
5.4.400.0270.03615.20
5.4.390.0360.03015.06
5.4.380.0100.03714.83
5.4.370.0050.03614.95
5.4.360.0170.03014.85
5.4.350.0150.03814.85
5.4.340.0230.03914.94
5.4.330.0060.00011.18
5.4.320.0070.02111.82
5.4.310.0060.01911.82
5.4.300.0050.02211.82
5.4.290.0060.02911.81
5.4.280.0050.02911.76
5.4.270.0060.02811.76
5.4.260.0090.03911.76
5.4.250.0090.05611.76
5.4.240.0060.03811.76
5.4.230.0060.02711.76
5.4.220.0050.02611.77
5.4.210.0080.04011.76
5.4.200.0080.02711.76
5.4.190.0130.03911.76
5.4.180.0090.03811.75
5.4.170.0090.03211.76
5.4.160.0040.03011.76
5.4.150.0100.03811.76
5.4.140.0080.03811.60
5.4.130.0080.04511.62
5.4.120.0080.04211.57
5.4.110.0100.04311.57
5.4.100.0130.04111.57
5.4.90.0140.03611.57
5.4.80.0150.03811.57
5.4.70.0080.02311.57
5.4.60.0090.04711.57
5.4.50.0030.02111.57
5.4.40.0040.02111.56
5.4.30.0080.02111.56
5.4.20.0050.03811.56
5.4.10.0100.03811.56
5.4.00.0030.03511.31
5.3.290.0030.02311.99
5.3.280.0080.03311.94
5.3.270.0060.04111.95
5.3.260.0090.03111.95
5.3.250.0070.03011.95
5.3.240.0050.03011.95
5.3.230.0070.03511.94
5.3.220.0100.04311.93
5.3.210.0040.03711.93
5.3.200.0060.04311.93
5.3.190.0060.03811.93
5.3.180.0040.03511.92
5.3.170.0070.03311.92
5.3.160.0030.03811.92
5.3.150.0080.03411.93
5.3.140.0080.03011.92
5.3.130.0040.03211.92
5.3.120.0050.03111.92
5.3.110.0050.03711.92
5.3.100.0040.03311.65
5.3.90.0030.03511.63
5.3.80.0050.03111.63
5.3.70.0040.03311.63
5.3.60.0070.02511.62
5.3.50.0040.03011.59
5.3.40.0060.02711.59
5.3.30.0080.02611.56
5.3.20.0090.04811.45
5.3.10.0050.03311.44
5.3.00.0100.02911.43
5.2.170.0030.02910.18
5.2.160.0040.02510.18
5.2.150.0060.03110.18
5.2.140.0030.02510.18
5.2.130.0070.01810.16
5.2.120.0050.01710.16
5.2.110.0020.01710.16
5.2.100.0060.01410.16
5.2.90.0040.01810.16
5.2.80.0060.01810.16
5.2.70.0050.01510.16
5.2.60.0030.01810.13
5.2.50.0040.01810.12
5.2.40.0020.01810.11
5.2.30.0020.01910.10
5.2.20.0070.02010.09
5.2.10.0060.01910.05
5.2.00.0030.0169.98
5.1.60.0030.0149.63
5.1.50.0020.0189.62
5.1.40.0060.0129.61
5.1.30.0030.0159.79
5.1.20.0030.0209.80
5.1.10.0050.0209.66
5.1.00.0030.0219.66
5.0.50.0060.0138.90
5.0.40.0040.0168.83
5.0.30.0020.0198.73
5.0.20.0030.0128.72
5.0.10.0030.0118.71
5.0.00.0010.0198.70
4.4.90.0040.0087.98
4.4.80.0010.0107.97
4.4.70.0020.0117.96
4.4.60.0030.0127.96
4.4.50.0020.0167.97
4.4.40.0020.0227.94
4.4.30.0050.0107.97
4.4.20.0020.0118.01
4.4.10.0030.0148.01
4.4.00.0040.0167.97
4.3.110.0030.0127.92
4.3.100.0050.0107.92
4.3.90.0020.0127.90
4.3.80.0060.0157.88
4.3.70.0030.0137.90
4.3.60.0040.0207.90
4.3.50.0020.0167.90
4.3.40.0040.0177.86
4.3.30.0020.0137.23
4.3.20.0010.0127.22
4.3.10.0040.0267.20
4.3.00.0120.01110.86

preferences:
39.33 ms | 401 KiB | 5 Q