3v4l.org

run code in 300+ PHP versions simultaneously
<?php if( method_exists('DateTime', 'diff') ){ $zone = new DateTimeZone('Europe/Madrid'); $start = new DateTime('2013-03-31 1:59:00 ', $zone); $end = new DateTime('2013-03-31 3:00:00', $zone); $difference = $start->diff($end); $cet = $difference->format('%H:%I:%S'); echo "CET: $cet\n"; $start->setTimeZone(new DateTimeZone('UTC')); $end->setTimeZone(new DateTimeZone('UTC')); $difference = $start->diff($end); $utm = $difference->format('%H:%I:%S'); echo "UTM: $utm\n"; echo ($cet===$utm ? 'Correct' : 'Error') . "\n"; }else{ echo 'DateTime::diff() no available yet'; }

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.3.60.0090.00618.41
8.3.50.0150.00722.81
8.3.40.0120.00318.82
8.3.30.0080.00819.09
8.3.20.0000.00720.22
8.3.10.0040.00421.75
8.3.00.0070.00019.07
8.2.180.0110.01118.54
8.2.170.0060.01222.96
8.2.160.0100.00720.52
8.2.150.0030.00725.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0000.00821.00
8.2.110.0000.01121.03
8.2.100.0040.00818.03
8.2.90.0090.00018.03
8.2.80.0060.00317.97
8.2.70.0050.00517.88
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0000.00919.95
8.2.30.0000.00718.27
8.2.20.0040.00417.88
8.2.10.0040.00418.17
8.2.00.0000.00717.83
8.1.280.0110.00325.92
8.1.270.0030.00619.05
8.1.260.0130.00626.35
8.1.250.0050.00328.09
8.1.240.0070.00322.52
8.1.230.0060.00620.95
8.1.220.0030.00617.78
8.1.210.0080.00018.96
8.1.200.0000.01017.48
8.1.190.0040.00417.25
8.1.180.0030.00618.10
8.1.170.0130.00218.71
8.1.160.0070.00022.07
8.1.150.0070.00019.02
8.1.140.0000.00717.54
8.1.130.0070.00017.88
8.1.120.0050.00317.55
8.1.110.0000.00717.66
8.1.100.0000.00717.59
8.1.90.0070.00017.57
8.1.80.0000.00717.67
8.1.70.0000.00717.61
8.1.60.0060.00317.77
8.1.50.0040.00417.56
8.1.40.0040.00417.54
8.1.30.0040.00417.75
8.1.20.0080.00017.73
8.1.10.0050.00217.63
8.1.00.0080.00017.64
8.0.300.0070.00019.80
8.0.290.0000.00816.88
8.0.280.0000.00718.54
8.0.270.0070.00017.04
8.0.260.0080.00017.41
8.0.250.0070.00017.19
8.0.240.0000.00817.14
8.0.230.0030.00317.08
8.0.220.0040.00417.15
8.0.210.0040.00417.15
8.0.200.0030.00317.04
8.0.190.0040.00417.06
8.0.180.0000.00817.13
8.0.170.0070.00017.01
8.0.160.0040.00417.18
8.0.150.0000.00717.03
8.0.140.0040.00417.11
8.0.130.0060.00013.49
8.0.120.0080.00017.12
8.0.110.0040.00417.07
8.0.100.0040.00417.18
8.0.90.0070.00016.91
8.0.80.0130.00917.05
8.0.70.0050.00317.11
8.0.60.0050.00217.01
8.0.50.0000.00716.92
8.0.30.0090.01017.21
8.0.20.0080.01117.45
8.0.10.0040.00417.07
8.0.00.0100.00716.87
7.4.330.0020.00215.03
7.4.320.0030.00316.71
7.4.300.0000.00616.77
7.4.290.0070.00016.81
7.4.280.0000.01116.72
7.4.270.0040.00416.75
7.4.260.0000.00716.73
7.4.250.0060.00316.68
7.4.240.0050.00216.70
7.4.230.0000.00716.75
7.4.220.0090.01616.76
7.4.210.0070.01016.70
7.4.200.0000.00816.74
7.4.160.0060.00916.76
7.4.150.0100.00717.40
7.4.140.0080.00917.86
7.4.130.0090.00916.70
7.4.120.0100.00816.55
7.4.110.0150.00416.65
7.4.100.0070.01416.68
7.4.90.0120.00616.54
7.4.80.0060.01119.39
7.4.70.0100.01016.87
7.4.60.0070.01016.84
7.4.50.0040.00816.64
7.4.40.0060.01116.71
7.4.30.0100.01316.68
7.4.10.0000.01814.96
7.4.00.0090.00715.12
7.3.330.0050.00313.39
7.3.320.0000.00513.23
7.3.310.0070.00016.60
7.3.300.0030.00316.47
7.3.290.0030.01116.49
7.3.280.0080.00716.48
7.3.270.0130.00417.40
7.3.260.0160.00616.52
7.3.250.0120.00716.61
7.3.240.0100.00716.75
7.3.230.0100.00716.72
7.3.210.0130.00316.63
7.3.200.0030.01319.39
7.3.190.0090.00616.72
7.3.180.0100.01016.74
7.3.170.0150.00716.63
7.3.160.0040.01116.69
7.3.130.0040.01114.98
7.3.120.0100.00714.88
7.3.110.0090.00614.96
7.3.100.0090.00615.36
7.3.90.0000.01415.04
7.3.80.0040.00814.83
7.3.70.0090.00614.91
7.3.60.0060.00314.97
7.3.50.0030.00715.09
7.3.40.0100.00315.19
7.3.30.0030.01014.71
7.3.20.0070.01116.64
7.3.10.0000.00916.59
7.3.00.0030.00916.87
7.2.330.0100.00716.95
7.2.320.0060.01516.63
7.2.310.0190.00316.70
7.2.300.0100.01316.87
7.2.290.0140.00716.89
7.2.260.0090.00915.39
7.2.250.0030.01014.79
7.2.240.0040.01115.25
7.2.230.0040.01115.50
7.2.220.0130.00315.36
7.2.210.0090.00614.88
7.2.200.0090.00615.14
7.2.190.0070.01015.45
7.2.180.0060.00915.39
7.2.170.0110.00415.28
7.2.160.0000.01415.02
7.2.150.0070.00716.84
7.2.140.0090.00916.82
7.2.130.0090.00617.16
7.2.120.0000.01216.81
7.2.110.0070.01017.04
7.2.100.0040.01517.23
7.2.90.0030.01417.09
7.2.80.0030.00716.93
7.2.70.0060.01017.00
7.2.60.0070.00817.03
7.2.50.0080.00717.09
7.2.40.0100.00317.21
7.2.30.0080.00417.06
7.2.20.0030.00917.20
7.2.10.0090.00617.06
7.2.00.0100.01016.96
7.1.330.0000.01516.13
7.1.320.0060.00916.23
7.1.310.0100.00615.80
7.1.300.0030.01016.02
7.1.290.0100.00715.79
7.1.280.0000.01216.02
7.1.270.0090.00316.05
7.1.260.0100.00015.82
7.1.250.0030.01016.16
7.1.240.0000.01415.79
7.1.230.0060.01016.01
7.1.220.0060.00315.86
7.1.210.0000.01316.01
7.1.200.0060.00715.91
7.1.190.0090.00615.99
7.1.180.0000.01415.79
7.1.170.0090.00015.60
7.1.160.0030.00616.06
7.1.150.0040.01116.02
7.1.140.0140.00315.71
7.1.130.0070.00715.81
7.1.120.0030.00716.03
7.1.110.0070.01016.04
7.1.100.0060.00916.05
7.1.90.0100.01016.13
7.1.80.0090.00315.89
7.1.70.0050.00916.59
7.1.60.0060.00616.71
7.1.50.0090.00816.50
7.1.40.0050.01116.32
7.1.30.0110.00316.50
7.1.20.0050.01116.52
7.1.10.0080.00816.20
7.1.00.0100.00016.39
7.0.330.0000.01015.41
7.0.320.0060.00315.61
7.0.310.0040.00715.75
7.0.300.0090.00315.32
7.0.290.0070.00715.43
7.0.280.0060.00315.58
7.0.270.0030.00915.58
7.0.260.0000.00815.56
7.0.250.0040.01215.66
7.0.240.0000.01615.45
7.0.230.0040.01515.53
7.0.220.0070.00715.73
7.0.210.0030.00615.29
7.0.200.0040.00816.38
7.0.190.0020.01016.27
7.0.180.0040.00715.80
7.0.170.0030.00816.10
7.0.160.0050.00816.08
7.0.150.0080.00916.08
7.0.140.0030.00816.12
7.0.130.0040.00816.01
7.0.120.0030.00816.17
7.0.110.0040.00915.99
7.0.100.0050.00915.99
7.0.90.0030.00816.14
7.0.80.0060.00616.02
7.0.70.0060.00516.07
7.0.60.0050.01115.75
7.0.50.0030.01016.05
7.0.40.0070.00714.28
7.0.30.0020.00914.23
7.0.20.0020.00714.31
7.0.10.0070.00514.32
7.0.00.0040.00614.40
5.6.400.0040.00414.39
5.6.390.0060.01014.56
5.6.380.0000.00914.75
5.6.370.0090.00614.13
5.6.360.0110.00314.44
5.6.350.0030.01214.45
5.6.340.0100.00014.34
5.6.330.0000.01414.45
5.6.320.0090.00914.63
5.6.310.0070.01014.52
5.6.300.0120.02317.55
5.6.290.0050.02317.62
5.6.280.0030.02917.80
5.6.270.0070.03517.71
5.6.260.0020.03117.75
5.6.250.0130.01917.81
5.6.240.0030.02617.75
5.6.230.0050.02617.67
5.6.220.0040.02717.48
5.6.210.0050.02717.88
5.6.200.0160.02617.71
5.6.190.0030.02817.61
5.6.180.0020.02617.65
5.6.170.0050.02717.69
5.6.160.0030.03017.68
5.6.150.0070.03417.62
5.6.140.0200.02517.56
5.6.130.0040.02717.65
5.6.120.0090.02117.69
5.6.110.0010.02617.78
5.6.100.0050.02417.60
5.6.90.0030.02617.68
5.6.80.0060.02417.34
5.6.70.0070.02317.42
5.6.60.0030.02517.24
5.6.50.0150.02317.31
5.6.40.0080.02017.40
5.6.30.0100.04217.22
5.6.20.0060.02117.37
5.6.10.0030.02317.38
5.6.00.0100.01817.33
5.5.380.0030.04217.57
5.5.370.0070.04017.52
5.5.360.0030.06917.57
5.5.350.0070.04017.55
5.5.340.0070.04017.95
5.5.330.0100.03117.70
5.5.320.0030.04417.70
5.5.310.0030.04117.96
5.5.300.0000.04518.00
5.5.290.0030.04518.03
5.5.280.0000.04417.98
5.5.270.0110.03918.01
5.5.260.0030.04218.02
5.5.250.0070.04017.75
5.5.240.0070.04017.09
5.5.230.0100.03017.23
5.5.220.0000.05417.37
5.5.210.0030.03817.34
5.5.200.0100.02917.19
5.5.190.0030.05217.41
5.5.180.0000.04517.18
5.5.160.0000.04617.09
5.5.150.0070.03717.41
5.5.140.0000.04017.41
5.5.130.0070.04617.40
5.5.120.0040.03917.40
5.5.110.0000.03917.37
5.5.100.0290.03217.19
5.5.90.0030.06417.32
5.5.80.0000.04217.20
5.5.70.0030.05217.36
5.5.60.0070.03317.20
5.5.50.0030.03617.25
5.5.40.0070.04316.95
5.5.30.0030.05017.21
5.5.20.0000.04617.18
5.5.10.0030.04217.26
5.5.00.0070.03717.29
5.4.450.0100.03719.27
5.4.440.0000.04819.32
5.4.430.0000.04219.44
5.4.420.0030.03919.15
5.4.410.0030.04119.16
5.4.400.0000.06019.09
5.4.390.0030.06719.01
5.4.380.0070.04318.80
5.4.370.0000.03919.00
5.4.360.0000.09418.95
5.4.350.0000.04418.83
5.4.340.0070.04019.00
5.4.320.0070.03918.99
5.4.310.0070.03318.92
5.4.300.0000.04419.01
5.4.290.0030.04018.96
5.4.280.0030.04219.00
5.4.270.0000.04318.80
5.4.260.0060.07718.99
5.4.250.0030.04318.94
5.4.240.0030.03618.92
5.4.230.0030.03919.00
5.4.220.0130.03319.08
5.4.210.0000.04318.77
5.4.200.0070.03518.92
5.4.190.0000.04418.91
5.4.180.0000.04218.91
5.4.170.0000.04218.81
5.4.160.0030.03818.98
5.4.150.0030.04118.95
5.4.140.0070.03616.60
5.4.130.0000.03816.60
5.4.120.0030.03416.53
5.4.110.0030.03416.59
5.4.100.0030.04316.58
5.4.90.0030.04016.68
5.4.80.0000.04116.67
5.4.70.0000.03716.55
5.4.60.0030.03616.49
5.4.50.0030.04316.33
5.4.40.0030.03716.33
5.4.30.0070.03316.48
5.4.20.0000.04316.55
5.4.10.0000.04916.55
5.4.00.0070.03615.91
5.3.290.0290.03915.00
5.3.280.0060.03515.00
5.3.270.0060.03515.00
5.3.260.0030.03815.00
5.3.250.0070.03415.00
5.3.240.0100.03215.00
5.3.230.0200.04015.00
5.3.220.0000.04215.00
5.3.210.0070.05415.00
5.3.200.0030.03415.00
5.3.190.0000.04115.00
5.3.180.0070.03415.00
5.3.170.0030.03815.00
5.3.160.0060.06515.00
5.3.150.0030.04015.00
5.3.140.0070.04915.00
5.3.130.0000.04215.00
5.3.120.0030.03915.00
5.3.110.0030.06015.00
5.3.100.0030.03815.00
5.3.90.0070.04015.00
5.3.80.0030.03415.00
5.3.70.0000.04015.00
5.3.60.0000.04115.00
5.3.50.0000.03615.00
5.3.40.0260.03915.00
5.3.30.0000.03915.00
5.3.20.0030.03615.00
5.3.10.0000.03715.00
5.3.00.0000.03615.00
5.2.170.0060.02815.00
5.2.160.0030.02615.00
5.2.150.0030.03015.00
5.2.140.0030.03815.00
5.2.130.0000.03515.00
5.2.120.0000.03115.00
5.2.110.0000.03315.00
5.2.100.0000.03015.00
5.2.90.0030.03815.00
5.2.80.0030.05115.00
5.2.70.0030.02815.00
5.2.60.0000.03115.00
5.2.50.0070.02615.00
5.2.40.0030.02915.00
5.2.30.0000.03415.00
5.2.20.0030.03015.00
5.2.10.0000.03315.00
5.2.00.0000.03115.00
5.1.60.0040.02215.00
5.1.50.0060.02115.00
5.1.40.0000.02515.00
5.1.30.0040.02515.00
5.1.20.0000.04215.00
5.1.10.0000.02715.00
5.1.00.0000.03015.00
5.0.50.0000.02715.00
5.0.40.0000.02515.00
5.0.30.0000.03515.00
5.0.20.0000.02215.00
5.0.10.0000.02015.00
5.0.00.0000.03315.00
4.4.90.0030.02315.00
4.4.80.0030.01715.00
4.4.70.0000.01815.00
4.4.60.0070.01315.00
4.4.50.0000.01615.00
4.4.40.0000.02915.00
4.4.30.0030.01315.00
4.4.20.0000.02515.00
4.4.10.0030.01315.00
4.4.00.0060.02515.00
4.3.110.0030.01515.00
4.3.100.0000.01715.00
4.3.90.0000.01715.00
4.3.80.0070.02315.00
4.3.70.0000.01615.00
4.3.60.0000.01715.00
4.3.50.0000.01815.00
4.3.40.0030.02415.00
4.3.30.0060.01015.00
4.3.20.0100.01415.00
4.3.10.0090.01515.00
4.3.00.0040.01815.00

preferences:
66.08 ms | 401 KiB | 5 Q