3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt_inicio = new DateTime(); $dt_inicio->setTimestamp(mktime(0,0,0, 6,20,2014)); $dt_fim = new DateTime(); $dt_fim->setTimestamp(mktime(0,0,0, 7,19,2015)); $interval = new DateInterval('P1M'); $diffAno = date('Y', $this->apura->tmfim) - date('Y', $this->apura->tminicio); $nmeses = (date('m', $this->apura->tmfim) + ($diffAno * 12)) - date('m', $this->apura->tminicio); $period = new DatePeriod($dt_inicio, $interval, $nmeses); foreach($period as $date){ $meses[] = array( "mes"=>$date->format('m'), "ano"=>$date->format('Y') ); } echo $meses;
based on tbnLX

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.00.0030.01116.80
7.2.130.0100.00317.08
7.2.120.0060.00617.05
7.2.110.0030.00716.84
7.2.100.0090.00316.89
7.2.90.0030.00917.15
7.2.80.0030.00916.77
7.2.70.0080.00817.11
7.2.60.0030.00817.13
7.2.50.0030.01017.05
7.2.40.0040.00417.02
7.2.30.0070.00716.85
7.2.20.0030.01017.13
7.2.10.0080.00417.00
7.2.00.0020.01418.20
7.1.250.0030.01016.02
7.1.240.0040.01115.84
7.1.230.0080.00315.87
7.1.220.0030.00815.91
7.1.210.0040.00415.52
7.1.200.0050.00815.96
7.1.190.0060.00315.84
7.1.180.0060.00315.55
7.1.170.0090.00315.83
7.1.160.0100.00416.06
7.1.150.0040.01115.91
7.1.140.0090.00015.70
7.1.130.0080.00015.87
7.1.120.0080.00015.67
7.1.110.0090.00615.82
7.1.100.0060.00617.12
7.1.90.0070.00715.68
7.1.80.0070.00716.01
7.1.70.0090.00316.42
7.1.60.0070.01117.77
7.1.50.0070.00416.47
7.1.40.0060.00815.78
7.1.30.0120.00015.73
7.1.20.0000.01315.95
7.1.10.0120.00015.60
7.1.00.0050.04219.10
7.0.330.0080.00015.18
7.0.320.0070.00315.38
7.0.310.0030.01015.50
7.0.300.0050.00315.03
7.0.290.0070.00714.99
7.0.280.0040.00815.18
7.0.270.0000.01415.37
7.0.260.0070.00015.00
7.0.250.0030.00615.30
7.0.240.0040.00915.25
7.0.230.0040.00815.25
7.0.220.0060.00615.40
7.0.210.0040.01114.90
7.0.200.0150.00515.11
7.0.190.0070.00715.46
7.0.180.0060.00315.29
7.0.170.0000.00915.46
7.0.160.0070.00715.53
7.0.150.0080.00015.39
7.0.140.0060.00915.26
7.0.130.0000.01115.58
7.0.120.0000.00815.23
7.0.110.0060.00615.61
7.0.100.0030.04718.44
7.0.90.0050.04318.58
7.0.80.0080.04018.64
7.0.70.0120.03518.57
7.0.60.0050.03118.65
7.0.50.0050.03118.81
7.0.40.0050.04616.78
7.0.30.0020.03116.78
7.0.20.0000.04916.74
7.0.10.0050.04516.81
7.0.00.0070.04316.83
5.6.380.0040.00414.34
5.6.370.0030.00714.05
5.6.360.0110.00314.29
5.6.350.0050.00313.92
5.6.340.0040.00414.38
5.6.330.0000.01214.27
5.6.320.0060.00314.07
5.6.310.0060.00614.36
5.6.300.0060.01214.36
5.6.290.0000.01114.30
5.6.280.0000.03317.65
5.6.270.0070.00714.31
5.6.260.0030.00514.70
5.6.250.0030.04417.43
5.6.240.0070.03417.54
5.6.230.0030.03317.61
5.6.220.0060.03717.39
5.6.210.0100.03817.44
5.6.200.0040.02717.78
5.6.190.0070.04117.67
5.6.180.0100.03917.63
5.6.170.0070.04617.54
5.6.160.0060.04117.53
5.6.150.0070.04317.64
5.6.140.0030.03517.56
5.6.130.0030.04617.75
5.6.120.0050.04517.61
5.6.110.0050.04717.54
5.6.100.0090.02017.71
5.6.90.0050.05017.58
5.6.80.0050.03017.33
5.6.70.0080.02617.29
5.6.60.0130.03817.29
5.6.50.0030.04617.25
5.6.40.0050.02517.54
5.6.30.0090.04417.31
5.6.20.0070.04117.40
5.6.10.0060.02917.38
5.6.00.0040.04017.51
5.5.380.0030.02915.84
5.5.370.0080.02215.78
5.5.360.0090.04015.79
5.5.350.0020.02815.76
5.5.340.0070.04216.09
5.5.330.0100.03816.04
5.5.320.0060.04016.04
5.5.310.0020.04216.01
5.5.300.0050.03315.96
5.5.290.0020.03216.03
5.5.280.0030.04316.05
5.5.270.0040.03716.03
5.5.260.0050.04115.98
5.5.250.0050.03215.90
5.5.240.0050.03015.73
5.5.230.0080.03815.67
5.5.220.0050.02415.71
5.5.210.0070.03915.72
5.5.200.0030.03915.68
5.5.190.0080.03615.72
5.5.180.0060.03815.69
5.5.170.0090.00311.18
5.5.160.0100.03515.72
5.5.150.0040.03915.64
5.5.140.0060.03915.70
5.5.130.0060.04015.59
5.5.120.0020.03315.65
5.5.110.0080.03815.73
5.5.100.0040.04315.67
5.5.90.0030.04015.62
5.5.80.0070.02815.59
5.5.70.0050.02615.65
5.5.60.0030.04515.64
5.5.50.0080.03415.63
5.5.40.0070.03615.66
5.5.30.0020.04215.61
5.5.20.0050.04315.63
5.5.10.0060.03315.60
5.5.00.0040.04415.61