3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (!class_exists('DateTime') ) { die('Feature not available yet'); } echo "mine:\n"; $a = date_create("2016-04-30", new DateTimeZone("UTC")); $b = date_create("now"); var_dump($a, $b, $a<$b, $a==$b, $a>$b); echo "\n"; echo "Same date:\n"; $a = new DateTime('2015-01-31 01:23:45 UTC'); $b = new DateTime('2015-01-31 02:23:45 Europe/Paris'); var_dump($a, $b, $a<$b, $a==$b, $a>$b); echo "\n"; echo "First greater than second:\n"; $a = new DateTime('2015-01-31 01:23:46 UTC'); $b = new DateTime('2015-01-31 02:23:45 Europe/Paris'); var_dump($a, $b, $a<$b, $a==$b, $a>$b); echo "\n"; echo "First less than second:\n"; $a = new DateTime('2015-01-31 01:23:45 UTC'); $b = new DateTime('2015-01-31 02:23:46 Europe/Paris'); var_dump($a, $b, $a<$b, $a==$b, $a>$b);
based on kEB2m

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.0170.00416.78
7.2.00.0060.00919.70
7.1.200.0070.00716.10
7.1.100.0000.01318.07
7.1.70.0000.00817.16
7.1.60.0060.01919.27
7.1.50.0070.00717.39
7.1.00.0070.07722.51
7.0.200.0090.00016.95
7.0.60.0070.03321.59
7.0.50.0070.03717.94
7.0.40.0070.04720.04
7.0.30.0330.05320.21
7.0.20.0330.06020.01
7.0.10.0070.08720.00
7.0.00.0070.09020.01
5.6.280.0000.04021.10
5.6.210.0030.09020.63
5.6.200.0000.07318.19
5.6.190.0130.03720.77
5.6.180.0330.05020.41
5.6.170.0200.04020.62
5.6.160.0070.08020.41
5.6.150.0070.08318.21
5.6.140.0070.07718.21
5.6.130.0030.06318.16
5.6.120.0070.04321.10
5.6.110.0100.08321.05
5.6.100.0000.08021.10
5.6.90.0100.09720.99
5.6.80.0030.07720.43
5.5.350.0030.07720.41
5.5.340.0030.04017.88
5.5.330.0170.07720.08
5.5.320.0530.04320.18
5.5.310.0270.07020.31
5.5.300.0000.04718.01
5.5.290.0100.07717.93
5.5.280.0130.07320.89
5.5.270.0100.07320.80
5.5.260.0130.04020.87
5.5.250.0100.07720.59
5.5.240.0130.07720.16
5.4.450.0200.08319.56
5.4.440.0470.05319.59
5.4.430.0330.06019.45
5.4.420.0300.05019.54
5.4.410.0270.05319.46
5.4.400.0230.05719.24
5.4.390.0430.04318.88
5.4.380.0230.06019.13
5.4.370.0270.05318.87
5.4.360.0300.05319.13
5.4.350.0230.05719.22
5.4.340.0300.06318.88
5.4.320.0400.04019.15
5.4.310.0230.04319.16
5.4.300.0370.05319.22
5.4.290.0370.04719.15
5.4.280.0400.04719.22
5.4.270.0400.04319.14
5.4.260.0270.05719.32
5.4.250.0330.04319.22
5.4.240.0330.04719.06
5.4.230.0230.06019.10
5.4.220.0300.05718.92
5.4.210.0330.06318.86
5.4.200.0330.04719.14
5.4.190.0430.04718.89
5.4.180.0300.05019.14
5.4.170.0470.03019.09
5.4.160.0370.05019.11
5.4.150.0230.05719.30
5.4.140.0270.05316.34
5.4.130.0130.06016.41
5.4.120.0300.04716.30
5.4.110.0370.04016.61
5.4.100.0370.04316.22
5.3.290.0100.06014.59
5.3.280.0230.05714.51
5.3.270.0270.05014.48
5.3.260.0330.05014.56
5.3.250.0200.05314.52
5.3.240.0330.05014.64
5.3.230.0170.06014.55
5.3.220.0230.05314.47
5.3.210.0300.05014.45
5.3.200.0300.04714.48