3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time=time(); $date = date("Y-m-d h:i:sa"); echo date_format($date,"Y/m/d H:i:s"); $d=mktime(14, 30, 00, date("d", $time), date("m", $time), date("Y", $time)); echo "<br />"."Created date is " . date("Y-m-d h:i:sa", $d); echo "<br />"."Current date is " . date("Y-m-d h:i:sa", $time); echo date_default_timezone_get(); $str_time = date("Y", $time)."-".date("m", $time)."-".date("d", $time)." 14:30:00"; echo $str_time; //echo "25-08-2011 17:30:30 = ".strtotime ("25-08-2011 17:30:30")." = ".date ("d-m-Y H:i:s", strtotime ("25-08-2011 17:30:30"))."<br>"; //echo "25-08-2011 17:31:17 = ".strtotime ("25-08-2011 17:31:17")." = ".date ("d-m-Y H:i:s", strtotime ("25-08-2011 17:31:17"))."<br>"; echo "====".date("H:i:s", strtotime ($str_time)-strtotime ($str_time))."===="; $localtime = localtime(); $localtime_assoc = localtime(time(), true); print_r($localtime); print_r($localtime_assoc);
based on M2MPb

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.10.0030.00616.58
7.3.00.0070.00717.00
7.2.130.0070.00717.07
7.2.120.0090.00617.25
7.2.110.0030.01417.05
7.2.100.0030.01016.89
7.2.90.0090.00916.95
7.2.80.0070.00716.81
7.2.70.0070.00417.11
7.2.60.0060.00817.00
7.2.50.0030.00617.09
7.2.40.0040.01117.12
7.2.30.0120.00316.98
7.2.20.0070.00317.14
7.2.10.0070.00717.19
7.2.00.0050.01018.37
7.1.250.0060.00916.12
7.1.200.0060.00615.63
7.1.100.0090.00318.30
7.1.70.0000.01216.95
7.1.60.0120.01219.48
7.1.50.0030.01817.21
7.1.00.0000.07322.45
7.0.200.0230.00715.01
7.0.80.0100.04719.93
7.0.70.0130.08020.14
7.0.60.0200.07319.98
7.0.50.0270.04320.35
7.0.40.0170.03020.18
7.0.30.0030.04320.09
7.0.20.0070.04720.14
7.0.10.0100.03720.02
7.0.00.0000.04720.10
5.6.230.0100.06020.54
5.6.220.0030.04720.63
5.6.210.0030.08320.56
5.6.200.0030.04320.95
5.6.190.0130.04321.04
5.6.180.0070.04021.12
5.6.170.0070.04321.00
5.6.160.0100.03721.11
5.6.150.0030.03720.96
5.6.140.0070.05321.02
5.6.130.0030.05021.10
5.6.120.0070.03720.96
5.6.110.0030.04021.00
5.6.100.0070.04021.06
5.6.90.0030.04021.15
5.6.80.0070.07320.39
5.6.70.0000.04320.39
5.6.60.0070.04720.32
5.6.50.0130.03020.41
5.6.40.0030.04720.37
5.6.30.0070.04020.30
5.6.20.0070.03720.43
5.6.10.0030.04020.41
5.6.00.0000.04320.42
5.5.370.0130.07720.38
5.5.360.0130.05020.40
5.5.350.0000.09020.43
5.5.340.0000.05020.80
5.5.330.0030.03720.78
5.5.320.0000.04320.81
5.5.310.0070.04020.88
5.5.300.0100.03320.78
5.5.290.0070.04020.83
5.5.280.0000.06720.80
5.5.270.0030.05020.88
5.5.260.0030.04720.88
5.5.250.0070.04020.73
5.5.240.0100.03320.21
5.5.230.0000.04320.17
5.5.220.0070.03720.26
5.5.210.0070.03720.25
5.5.200.0070.03720.23
5.5.190.0030.03320.13
5.5.180.0070.03320.18
5.5.160.0130.07020.24
5.5.150.0000.06020.27
5.5.140.0000.04320.08
5.5.130.0070.03720.13
5.5.120.0030.04020.23
5.5.110.0070.03719.98
5.5.100.0070.03720.08
5.5.90.0070.03319.97
5.5.80.0100.04020.12
5.5.70.0130.02719.94
5.5.60.0030.03320.14
5.5.50.0000.04320.15
5.5.40.0070.03020.14
5.5.30.0070.03720.09
5.5.20.0030.06720.03
5.5.10.0030.03320.04
5.5.00.0100.03020.04