3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print_r(verifyDate('1.1.2011')); echo ':::'; print_r(getMonth(null)); echo ':::'; print_r(getQuarter(null)); echo ':::'; print_r(dtf(' ')); function getMonth($d) { return dtf($d,'n'); } function getQuarter($d) { return ceil( getMonth($d) / 3); } function verifyDate($date) { return DateTime::createFromFormat('m/d/Y', $date); } function dtf($date, $format = 'd.m.Y'){ if($date){ $date = new DateTime($date); return $date->format($format); } }
based on QmCpR

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.0290.01216.79
7.2.00.0000.01719.21
7.1.200.0040.00716.10
7.1.100.0030.01018.26
7.1.70.0080.00317.39
7.1.60.0110.01519.13
7.1.50.0060.01516.88
7.1.00.0000.08022.57
7.0.200.0050.00316.86
7.0.60.0030.09319.90
7.0.50.0130.07317.87
7.0.40.0100.08020.13
7.0.30.0270.07320.21
7.0.20.0230.04720.30
7.0.10.0170.07720.23
7.0.00.0030.04720.18
5.6.280.0070.03020.89
5.6.210.0070.05720.65
5.6.200.0100.08318.22
5.6.190.0030.05320.52
5.6.180.0070.05020.77
5.6.170.0300.06320.47
5.6.160.0130.07720.56
5.6.150.0070.08318.24
5.6.140.0100.06318.27
5.6.130.0000.06318.23
5.6.120.0070.06721.03
5.6.110.0130.06320.95
5.6.100.0100.08020.95
5.6.90.0070.08720.93
5.6.80.0170.07020.39
5.5.350.3930.03720.39
5.5.340.0030.04718.09
5.5.330.0100.04320.27
5.5.320.0300.06020.35
5.5.310.0270.03320.28
5.5.300.0100.04718.01
5.5.290.0100.06717.93
5.5.280.0100.08020.88
5.5.270.0100.07320.82
5.5.260.0100.03720.80
5.5.250.0170.07320.63
5.5.240.0230.06320.15
5.4.450.0470.06319.47
5.4.440.0530.06319.31
5.4.430.0400.05719.61
5.4.420.0370.06019.32
5.4.410.0500.04319.34
5.4.400.0570.06018.99
5.4.390.0570.07319.38
5.4.380.0400.08018.87
5.4.370.0530.08319.26
5.4.360.0230.05319.38
5.4.350.0470.06019.15
5.4.340.0500.04319.26
5.4.320.0430.05719.14
5.4.310.0470.05019.25
5.4.300.0630.05019.40
5.4.290.0430.06019.26
5.4.280.0800.05319.22
5.4.270.0570.06019.14
5.4.260.0500.05719.11
5.4.250.0500.05019.05
5.4.240.0400.06319.22
5.4.230.0500.05019.27
5.4.220.0570.07319.11
5.4.210.0600.06019.14
5.4.200.0770.05019.00
5.4.190.0570.06019.26
5.4.180.0570.05719.14
5.4.170.0470.05719.26
5.4.160.0700.05318.98
5.4.150.0770.05319.14
5.4.140.0500.05716.54
5.4.130.0370.05316.39
5.4.120.0600.05316.34
5.4.110.0600.05716.24
5.4.100.0430.06316.31
5.3.290.0430.07314.55
5.3.280.0570.05714.82
5.3.270.0370.06314.64
5.3.260.0600.05714.84
5.3.250.0800.03714.53
5.3.240.0530.05314.61
5.3.230.0270.04014.52
5.3.220.0700.05714.66
5.3.210.0670.05314.60
5.3.200.0430.06014.66