3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!class_exists('DateTime') ) { die('Feature not available yet'); } 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);

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).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.20.0090.00917.84
8.4.10.0130.00317.71
8.3.150.0170.00320.51
8.3.140.0120.00616.52
8.3.130.0080.00016.72
8.3.120.0030.00620.66
8.3.110.0040.00420.94
8.3.100.0060.00324.06
8.3.90.0030.00626.77
8.3.80.0030.00716.47
8.3.70.0150.00416.88
8.3.60.0070.00718.55
8.3.50.0290.01221.22
8.3.40.0120.00318.82
8.3.30.0150.00018.80
8.3.20.0040.00420.19
8.3.10.0050.00221.85
8.3.00.0040.00419.94
8.2.260.0060.00319.91
8.2.250.0100.00716.74
8.2.240.0050.00518.99
8.2.230.0100.01022.58
8.2.220.0130.01037.54
8.2.210.0090.00026.77
8.2.200.0090.00018.68
8.2.190.0090.00618.54
8.2.180.0140.00725.92
8.2.170.0120.00619.01
8.2.160.0110.01122.96
8.2.150.0050.00325.66
8.2.140.0050.00324.66
8.2.130.0040.01126.16
8.2.120.0060.00919.84
8.2.110.0060.00319.18
8.2.100.0190.00318.24
8.2.90.0170.00318.16
8.2.80.0170.00218.21
8.2.70.0160.00318.10
8.2.60.0160.00518.04
8.2.50.0150.00617.95
8.2.40.0080.00918.18
8.2.30.0120.00618.05
8.2.20.0140.00317.87
8.2.10.0110.00618.09
8.2.00.0100.00418.10
8.1.310.0150.00316.89
8.1.300.0120.00919.83
8.1.290.0030.00630.84
8.1.280.0150.00025.92
8.1.270.0090.00024.66
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0070.00321.04
8.1.230.0110.00418.35
8.1.220.0150.00218.11
8.1.210.0130.00518.61
8.1.200.0180.00217.96
8.1.190.0120.00517.72
8.1.180.0130.00417.89
8.1.170.0130.00418.75
8.1.160.0130.00418.22
8.1.150.0120.00518.29
8.1.140.0140.00317.87
8.1.130.0120.00417.76
8.1.120.0110.00617.78
8.1.110.0110.00617.87
8.1.100.0110.00717.80
8.1.90.0140.00517.87
8.1.80.0100.00817.87
8.1.70.0080.00917.84
8.1.60.0140.00417.89
8.1.50.0150.00317.82
8.1.40.0140.00517.85
8.1.30.0110.00617.87
8.1.20.0110.00617.87
8.1.10.0130.00317.82
8.1.00.0100.00617.72
8.0.300.0120.00618.61
8.0.290.0130.00517.66
8.0.280.0100.00818.49
8.0.270.0140.00317.42
8.0.260.0140.00417.33
8.0.250.0060.00817.35
8.0.240.0130.00417.41
8.0.230.0150.00417.35
8.0.220.0110.00517.37
8.0.210.0130.00417.37
8.0.200.0140.00317.47
8.0.190.0130.00517.49
8.0.180.0140.00417.38
8.0.170.0150.00217.43
8.0.160.0090.00717.41
8.0.150.0120.00417.36
8.0.140.0100.00417.31
8.0.130.0110.00516.45
8.0.120.0140.00217.38
8.0.110.0110.00617.34
8.0.100.0130.00417.34
8.0.90.0120.00417.28
8.0.80.0150.00517.35
8.0.70.0120.00417.35
8.0.60.0110.00517.30
8.0.50.0120.00317.32
8.0.30.0160.00217.32
8.0.20.0140.00517.43
8.0.10.0110.00917.39
8.0.00.0140.00817.28
7.4.330.0110.00316.53
7.4.320.0120.00517.20
7.4.300.0120.00517.23
7.4.290.0130.00417.21
7.4.280.0110.00517.09
7.4.270.0100.00617.06
7.4.260.0140.00217.07
7.4.250.0110.00417.10
7.4.240.0120.00317.08
7.4.230.0080.00617.10
7.4.220.0120.00517.08
7.4.210.0090.00816.95
7.4.200.0120.00417.13
7.4.190.0070.01017.26
7.4.180.0120.00517.25
7.4.160.0120.00617.13
7.4.150.0110.00717.22
7.4.140.0110.00817.37
7.4.130.0130.00816.88
7.4.120.0130.00716.91
7.4.110.0130.00916.81
7.4.100.0130.00816.84
7.4.90.0140.00616.89
7.4.80.0140.00717.29
7.4.70.0140.00716.90
7.4.60.0130.00816.92
7.4.50.0090.00916.87
7.4.40.0130.00716.80
7.4.30.0120.00816.86
7.4.20.0140.00716.94
7.4.10.0110.01016.50
7.4.00.0120.00716.14
7.3.330.0130.00316.19
7.3.320.0120.00316.11
7.3.310.0120.00416.95
7.3.300.0120.00416.91
7.3.290.0130.00716.94
7.3.280.0120.00616.73
7.3.270.0140.00517.20
7.3.260.0090.01116.89
7.3.250.0120.00616.76
7.3.240.0140.00816.84
7.3.230.0130.00916.72
7.3.220.0160.00716.80
7.3.210.0140.01016.73
7.3.200.0150.00916.69
7.3.190.0140.00816.80
7.3.180.0170.00716.77
7.3.170.0160.00516.78
7.3.160.0140.00916.68
7.3.150.0150.00616.76
7.3.140.0150.00716.81
7.3.130.0130.00716.37
7.3.120.0130.00816.02
7.3.110.0110.00915.93
7.3.100.0120.00715.92
7.3.90.0120.00815.84
7.3.80.0120.00715.80
7.3.70.0120.00715.80
7.3.60.0120.00715.79
7.3.50.0120.00715.78
7.3.40.0120.00615.85
7.3.30.0110.00815.79
7.3.20.0160.00916.38
7.3.10.0130.00816.41
7.3.00.0110.00816.41
7.2.340.0140.01116.81
7.2.330.0150.00816.76
7.2.320.0180.00816.82
7.2.310.0150.00916.82
7.2.300.0160.00716.82
7.2.290.0130.00916.87
7.2.280.0160.00816.83
7.2.270.0160.00816.88
7.2.260.0140.00816.47
7.2.250.0150.00716.16
7.2.240.0120.00916.08
7.2.230.0110.01016.03
7.2.220.0120.00915.94
7.2.210.0120.00715.94
7.2.200.0100.00915.96
7.2.190.0110.00915.97
7.2.180.0110.00815.91
7.2.170.0110.00915.98
7.2.160.0130.00716.03
7.2.150.0120.01016.57
7.2.140.0140.00816.64
7.2.130.0120.00916.64
7.2.120.0140.00716.67
7.2.110.0130.00716.62
7.2.100.0110.00916.59
7.2.90.0130.00816.60
7.2.80.0170.00716.65
7.2.70.0100.01016.65
7.2.60.0120.00816.67
7.2.50.0140.00916.63
7.2.40.0120.00916.60
7.2.30.0140.00616.61
7.2.20.0130.00716.60
7.2.10.0110.01016.62
7.2.00.0130.00616.68
7.1.330.0140.00816.04
7.1.320.0130.00915.80
7.1.310.0130.00715.81
7.1.300.0120.01015.70
7.1.290.0130.00915.69
7.1.280.0130.00915.66
7.1.270.0150.00715.74
7.1.260.0140.00815.70
7.1.250.0160.00715.75
7.1.240.0130.00815.72
7.1.230.0140.00815.76
7.1.220.0150.00715.78
7.1.210.0130.00915.69
7.1.200.0150.00915.90
7.1.190.0140.00715.90
7.1.180.0150.00715.92
7.1.170.0150.00615.91
7.1.160.0170.00615.84
7.1.150.0130.00715.87
7.1.140.0130.00815.86
7.1.130.0150.00815.88
7.1.120.0120.00915.88
7.1.110.0140.00615.90
7.1.100.0110.00816.08
7.1.90.0200.00715.91
7.1.80.0140.00815.86
7.1.70.0140.00715.97
7.1.60.0100.00916.02
7.1.50.0120.00815.98
7.1.40.0110.00916.00
7.1.30.0130.00716.03
7.1.20.0110.00815.99
7.1.10.0110.00716.02
7.1.00.0100.00816.04
7.0.330.0140.00815.59
7.0.320.0130.00915.54
7.0.310.0150.00715.57
7.0.300.0130.00815.50
7.0.290.0150.00615.53
7.0.280.0130.00915.56
7.0.270.0150.00615.51
7.0.260.0140.00715.61
7.0.250.0120.00815.58
7.0.240.0160.00615.59
7.0.230.0140.00715.64
7.0.220.0170.00415.65
7.0.210.0180.00715.68
7.0.200.0140.00615.76
7.0.190.0140.00515.84
7.0.180.0120.00815.76
7.0.170.0140.00615.79
7.0.160.0110.00815.74
7.0.150.0140.00515.81
7.0.140.0130.00815.75
7.0.130.0120.00715.81
7.0.120.0110.00815.75
7.0.110.0160.00615.76
7.0.100.0150.00615.72
7.0.90.0120.00715.77
7.0.80.0100.00815.75
7.0.70.0120.00615.78
7.0.60.0150.00715.84
7.0.50.0140.00715.95
7.0.40.0110.00715.73
7.0.30.0120.00515.57
7.0.20.0140.00615.63
7.0.10.0140.00715.57
7.0.00.0120.00715.59
5.6.400.0180.00515.87
5.6.390.0160.00815.89
5.6.380.0140.00815.68
5.6.370.0130.00915.60
5.6.360.0150.00815.69
5.6.350.0150.00715.70
5.6.340.0150.00815.68
5.6.330.0160.00615.65
5.6.320.0150.00615.67
5.6.310.0140.00815.72
5.6.300.0130.01216.13
5.6.290.0130.01116.17
5.6.280.0130.01116.15
5.6.270.0130.01116.14
5.6.260.0130.01016.20
5.6.250.0120.01116.21
5.6.240.0130.01116.17
5.6.230.0140.01116.20
5.6.220.0140.01016.14
5.6.210.0140.00916.10
5.6.200.0140.01416.15
5.6.190.0110.01116.17
5.6.180.0100.01616.21
5.6.170.0130.01216.15
5.6.160.0110.01216.19
5.6.150.0150.01316.21
5.6.140.0130.01016.11
5.6.130.0140.00916.16
5.6.120.0140.01016.18
5.6.110.0120.01216.09
5.6.100.0120.01116.11
5.6.90.0130.01016.05
5.6.80.0110.01116.04
5.6.70.0100.01316.05
5.6.60.0120.01116.05
5.6.50.0140.00916.11
5.6.40.0120.01016.10
5.6.30.0150.01316.12
5.6.20.0120.01116.08
5.6.10.0120.01416.07
5.6.00.0110.01616.07
5.5.380.0140.01115.52
5.5.370.0140.01015.49
5.5.360.0100.01315.60
5.5.350.0130.01515.59
5.5.340.0140.01015.56
5.5.330.0120.01415.58
5.5.320.0110.01215.55
5.5.310.0150.01215.60
5.5.300.0160.00815.50
5.5.290.0130.01115.57
5.5.280.0140.01215.56
5.5.270.0130.01215.50
5.5.260.0180.00815.53
5.5.250.0150.01015.55
5.5.240.0100.01315.47
5.5.230.0140.01015.43
5.5.220.0130.01515.50
5.5.210.0110.01215.50
5.5.200.0130.01315.42
5.5.190.0150.01215.45
5.5.180.0140.01115.45
5.5.170.0150.00815.28
5.5.160.0150.01015.56
5.5.150.0120.01215.54
5.5.140.0120.01215.55
5.5.130.0140.01215.43
5.5.120.0140.01015.52
5.5.110.0140.01115.45
5.5.100.0110.01515.42
5.5.90.0120.01115.44
5.5.80.0130.01115.58
5.5.70.0120.01415.52
5.5.60.0140.01215.46
5.5.50.0140.01115.47
5.5.40.0120.01515.47
5.5.30.0140.01015.48
5.5.20.0120.01215.53
5.5.10.0110.01215.41
5.5.00.0130.01115.50
5.4.450.0100.00913.77
5.4.440.0110.00913.74
5.4.430.0110.01113.70
5.4.420.0110.01013.74
5.4.410.0090.01113.73
5.4.400.0110.01013.68
5.4.390.0100.01013.69
5.4.380.0120.00713.72
5.4.370.0120.01013.67
5.4.360.0110.00913.68
5.4.350.0120.00913.68
5.4.340.0110.00913.70
5.4.330.0120.00613.17
5.4.320.0120.01013.68
5.4.310.0110.01013.70
5.4.300.0110.01013.69
5.4.290.0100.01113.68
5.4.280.0120.00913.69
5.4.270.0110.01013.66
5.4.260.0110.01213.69
5.4.250.0110.01013.71
5.4.240.0120.00813.67
5.4.230.0110.01013.64
5.4.220.0110.01113.57
5.4.210.0110.01413.64
5.4.200.0120.01013.63
5.4.190.0130.01113.69
5.4.180.0120.01113.62
5.4.170.0120.00713.66
5.4.160.0100.01113.68
5.4.150.0100.01113.61
5.4.140.0120.00913.44
5.4.130.0110.01113.53
5.4.120.0110.01013.48
5.4.110.0110.00813.47
5.4.100.0110.01113.50
5.4.90.0100.01213.46
5.4.80.0090.01113.56
5.4.70.0110.01013.55
5.4.60.0110.00813.50
5.4.50.0100.00913.50
5.4.40.0100.01013.54
5.4.30.0100.01113.49
5.4.20.0090.01213.53
5.4.10.0130.00813.50
5.4.00.0110.01013.55

preferences:
35.75 ms | 403 KiB | 5 Q