3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime('2015-01-15 15:00:00'); var_dump($date); $date->setTimezone(new DateTimeZone('CET')); echo "\n Date timestamp using format(): " . $date->format('U'); echo "\n Date timestamp using getTimestamp(): " . $date->getTimestamp(); echo "\nChanging timezone to CET"; $date->setTimezone(new DateTimeZone('CET')); echo "\n Date timestamp using format(): " . $date->format('U') . ' NB: This has changed?!?!'; echo "\n Date timestamp using getTimestamp(): " . $date->getTimestamp() . ' NB: Now it is back?!?!'; echo "\n Date timestamp using format() again: " . $date->format('U') . ' NB: Now it is back?!?!';
based on JhmZF

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.0120.00416.63
7.3.00.0140.00316.52
7.2.130.0100.01017.28
7.2.120.0070.00717.10
7.2.110.0000.01416.93
7.2.100.0120.00317.00
7.2.90.0070.01017.09
7.2.80.0060.00917.07
7.2.70.0200.00316.95
7.2.60.0070.00616.99
7.2.50.0070.01017.06
7.2.40.0230.00316.88
7.2.30.0100.00716.84
7.2.20.0100.00716.82
7.2.10.0070.00716.99
7.2.00.0070.01018.32
7.1.250.0070.01115.98
7.1.200.0040.00715.98
7.1.100.0070.00718.30
7.1.70.0000.00817.15
7.1.60.0090.01219.36
7.1.50.0100.00717.06
7.1.00.0070.07322.40
7.0.200.0000.00916.91
7.0.60.0030.05320.06
7.0.50.0100.05317.92
7.0.40.0030.08020.20
7.0.30.0470.08020.18
7.0.20.0270.05720.12
7.0.10.0130.04720.05
7.0.00.0100.08720.02
5.6.280.0000.03721.06
5.6.210.0270.06720.70
5.6.200.0100.04718.18
5.6.190.0070.06320.56
5.6.180.0270.04020.43
5.6.170.0230.04020.54
5.6.160.0100.07720.61
5.6.150.0030.04718.09
5.6.140.0030.05718.18
5.6.130.0130.04018.18
5.6.120.0070.04020.89
5.6.110.0130.07721.08
5.6.100.0030.04020.88
5.6.90.0100.03720.97
5.6.80.0030.03720.36
5.5.350.0170.04720.32
5.5.340.0130.07017.99
5.5.330.0170.06320.07
5.5.320.0300.07320.33
5.5.310.0200.07320.17
5.5.300.0070.06317.98
5.5.290.0070.08017.96
5.5.280.0070.07320.84
5.5.270.0070.04020.67
5.5.260.0100.07720.85
5.5.250.0100.04720.46
5.5.240.0270.03720.23
5.4.450.0630.05319.23
5.4.440.0770.05319.27
5.4.430.0600.07019.61
5.4.420.0570.05319.45
5.4.410.0570.06019.44
5.4.400.0830.07019.29
5.4.390.0670.07318.81
5.4.380.0470.06718.80
5.4.370.0600.06018.81
5.4.360.0630.05718.91
5.4.350.0570.05318.98
5.4.340.0600.05319.14
5.4.320.0670.08019.15
5.4.310.0800.05718.79
5.4.300.0530.05718.98
5.4.290.0700.05319.27
5.4.280.0730.06319.04
5.4.270.0200.06718.80
5.4.260.0370.06019.30
5.4.250.0300.04719.20
5.4.240.0170.06718.94
5.4.230.0330.06018.80
5.4.220.0370.05719.19
5.4.210.0130.08318.78
5.4.200.0370.04719.14
5.4.190.0230.05319.13
5.4.180.0300.07719.14
5.4.170.0400.03719.30
5.4.160.0270.06019.06
5.4.150.0170.06019.07
5.4.140.0170.07016.29
5.4.130.0170.05016.34
5.4.120.0200.04716.25
5.4.110.0230.06316.57
5.4.100.0330.05016.52
5.4.90.0330.04016.11
5.3.290.0800.07714.64
5.3.280.0400.06714.58
5.3.270.0500.06314.59
5.3.260.0370.04314.59
5.3.250.0300.04014.45
5.3.240.0300.04314.44
5.3.230.0270.04714.47
5.3.220.0200.05014.41
5.3.210.0370.06014.40
5.3.200.0330.04314.40
5.3.190.0170.05314.43