3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function isMarketOpen($timestamp) { //>Wed 11:32:10 EST //$timezone = new DateTimeZone('EST'); $nowDate = new DateTime((string) $timestamp); $marketCloseTime = new DateTime('17:00:00'); $marketOpenTime = new DateTime('08:00:00'); echo $marketOpenTime->format('r'); echo "\n"; echo $nowDate->format('r'); return ($nowDate > $marketOpenTime && $nowDate < $marketCloseTime); } isMarketOpen('Wed 07:32:10 EST');
based on mEEOK

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.2.60.0040.01117.05
7.2.00.0100.00719.71
7.1.200.0090.00615.95
7.1.100.0060.00618.00
7.1.70.0000.00717.01
7.1.60.0070.01719.12
7.1.50.0060.01617.26
7.1.00.0130.06722.32
7.0.200.0030.00716.80
7.0.140.0130.06321.99
7.0.60.0070.08319.96
7.0.50.0030.04317.92
7.0.40.0170.03720.25
7.0.30.0330.06020.17
7.0.20.0230.07020.10
7.0.10.0070.09020.06
7.0.00.0100.04320.18
5.6.280.0030.07321.07
5.6.210.0130.07320.70
5.6.200.0070.07018.26
5.6.190.0130.05020.67
5.6.180.0230.08020.61
5.6.170.0300.08020.44
5.6.160.0070.04320.71
5.6.150.0070.04318.25
5.6.140.0170.07018.21
5.6.130.0130.06718.19
5.6.120.0070.07021.00
5.6.110.0070.06721.12
5.6.100.0070.03721.10
5.6.90.0130.06721.14
5.6.80.0100.08020.53
5.6.70.3900.04020.38
5.5.350.0230.04320.32
5.5.340.0070.04318.07
5.5.330.0000.04320.44
5.5.320.0230.03720.30
5.5.310.0170.04020.32
5.5.300.0100.04717.97
5.5.290.0030.04017.98
5.5.280.0070.05020.85
5.5.270.0070.06320.89
5.5.260.0130.03320.87
5.5.250.0100.07720.78
5.5.240.0230.05720.17
5.4.450.0330.03319.64
5.4.440.0400.04719.45
5.4.430.0300.04719.48
5.4.420.0230.04019.45
5.4.410.0470.04719.45
5.4.400.0630.03319.45
5.4.390.0230.04719.45
5.4.380.0270.05718.75
5.4.370.0200.06318.79
5.4.360.0470.04318.73
5.4.350.0370.06318.77
5.4.340.0330.05718.53
5.4.320.0070.04112.50
5.4.310.0080.04112.50
5.4.300.0070.03612.50
5.4.290.0060.04012.50
5.4.280.0060.03712.40
5.4.270.0110.03912.40
5.4.260.0050.04312.40
5.4.250.0070.03712.40
5.4.240.0030.04212.40
5.4.230.0040.04312.39
5.4.220.0060.03612.39
5.4.210.0050.03812.39
5.4.200.0040.04212.39
5.4.190.0090.03512.39
5.4.180.0070.03312.39
5.4.170.0070.04012.40
5.4.160.0040.03512.39
5.4.150.0080.03812.39
5.4.140.0110.03512.07
5.4.130.0050.03912.06
5.4.120.0030.03612.01
5.4.110.0060.03412.01
5.4.100.0080.03212.01
5.4.90.0040.03812.02
5.4.80.0060.03612.02
5.4.70.0050.03412.01
5.4.60.0060.03412.01
5.4.50.0060.03412.01
5.4.40.0070.03212.00
5.4.30.0050.03611.99
5.4.20.0070.03412.00
5.4.10.0050.03511.99
5.4.00.0080.03311.48
5.3.290.0070.03912.80
5.3.280.0070.03512.71
5.3.270.0060.03812.72
5.3.260.0030.04612.72
5.3.250.0060.04312.72
5.3.240.0070.03412.72
5.3.230.0060.03612.71
5.3.220.0110.03212.68
5.3.210.0060.03712.68
5.3.200.0030.04012.68
5.3.190.0080.03612.68
5.3.180.0040.03912.68
5.3.170.0060.03712.67
5.3.160.0070.04112.68
5.3.150.0060.03712.68
5.3.140.0070.03712.66
5.3.130.0080.04312.66
5.3.120.0060.04012.66
5.3.110.0070.03712.66
5.3.100.0070.03612.12
5.3.90.0120.03912.11
5.3.80.0060.03512.09
5.3.70.0020.03912.09
5.3.60.0080.03312.08
5.3.50.0030.03712.02
5.3.40.0050.03612.02
5.3.30.0070.03311.98
5.3.20.0060.03411.76
5.3.10.0060.03511.73
5.3.00.0040.03711.72
5.2.170.0040.0309.22
5.2.160.0020.0319.21
5.2.150.0050.0339.23
5.2.140.0040.0369.21
5.2.130.0060.0289.17
5.2.120.0020.0329.18
5.2.110.0040.0299.18
5.2.100.0070.0269.18
5.2.90.0030.0319.18
5.2.80.0030.0319.17
5.2.70.0050.0309.17
5.2.60.0050.0309.13
5.2.50.0060.0329.10
5.2.40.0050.0299.08
5.2.30.0080.0349.05
5.2.20.0040.0319.04
5.2.10.0040.0288.95
5.2.00.0050.0288.81
5.1.60.0010.0278.09
5.1.50.0010.0278.09
5.1.40.0010.0278.07
5.1.30.0040.0268.42
5.1.20.0020.0298.43
5.1.10.0060.0248.16
5.1.00.0040.0308.16
5.0.50.0020.0216.64
5.0.40.0020.0236.51
5.0.30.0040.0306.31
5.0.20.0050.0176.28
5.0.10.0020.0226.26
5.0.00.0030.0316.25
4.4.90.0010.0164.78
4.4.80.0050.0194.75
4.4.70.0020.0184.75
4.4.60.0030.0144.76
4.4.50.0040.0234.77
4.4.40.0050.0244.71
4.4.30.0050.0134.76
4.4.20.0020.0164.84
4.4.10.0060.0124.84
4.4.00.0030.0244.75
4.3.110.0050.0154.67
4.3.100.0020.0154.66
4.3.90.0030.0144.64
4.3.80.0040.0304.58
4.3.70.0060.0174.63
4.3.60.0050.0164.62
4.3.50.0010.0164.63
4.3.40.0030.0244.54
4.3.30.0010.0173.30
4.3.20.0020.0173.27
4.3.10.0030.0173.24
4.3.00.0030.01319.45