3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date_default_timezone_get() . PHP_EOL; date_default_timezone_set('UTC'); $date1 = new DateTime("@1442862000"); var_dump($date1->getTimestamp()); //prints: 1442862000 echo $date1->format(DATE_RFC822 . " e T O"), "\n"; $date1->setTimezone(new DateTimeZone("Asia/Tehran")); var_dump($date1->getTimestamp()); //prints: 1442865600 echo $date1->format(DATE_RFC822 . " e T O"), "\n"; $next = 1442862000 * 60 * 60 * 60; $date1 = new DateTime("@$next"); var_dump($date1->getTimestamp()); //prints: 1442862000 echo $date1->format(DATE_RFC822 . " e T O"), "\n"; $date1->setTimezone(new DateTimeZone("Asia/Tehran")); var_dump($date1->getTimestamp()); //prints: 1442865600 echo $date1->format(DATE_RFC822 . " e T O"), "\n";

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.0060.00918.68
8.3.50.0100.00716.88
8.3.40.0080.00818.77
8.3.30.0070.00718.95
8.3.20.0030.00620.16
8.3.10.0040.00423.52
8.3.00.0040.00423.65
8.2.180.0110.00416.63
8.2.170.0090.00622.96
8.2.160.0100.00320.43
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0070.00720.08
8.2.120.0080.00026.35
8.2.110.0030.00622.13
8.2.100.0110.00017.93
8.2.90.0050.00319.39
8.2.80.0030.00617.97
8.2.70.0000.00917.75
8.2.60.0040.00418.16
8.2.50.0000.00818.07
8.2.40.0080.00022.14
8.2.30.0040.00419.70
8.2.20.0040.00418.01
8.2.10.0000.00719.89
8.2.00.0000.00718.23
8.1.280.0100.01025.92
8.1.270.0110.00823.77
8.1.260.0040.00428.09
8.1.250.0060.00328.09
8.1.240.0070.00323.95
8.1.230.0120.00018.97
8.1.220.0040.00417.93
8.1.210.0050.00318.77
8.1.200.0030.00617.48
8.1.190.0040.00417.36
8.1.180.0030.00618.10
8.1.170.0050.00318.77
8.1.160.0000.00720.87
8.1.150.0040.00418.92
8.1.140.0080.00019.79
8.1.130.0050.00317.86
8.1.120.0040.00417.82
8.1.110.0040.00417.64
8.1.100.0040.00417.74
8.1.90.0030.00517.77
8.1.80.0000.00717.72
8.1.70.0040.00417.68
8.1.60.0000.00817.86
8.1.50.0060.00317.64
8.1.40.0040.00417.80
8.1.30.0080.00017.76
8.1.20.0080.00017.95
8.1.10.0000.00817.80
8.1.00.0040.00717.77
8.0.300.0000.00918.77
8.0.290.0060.00317.00
8.0.280.0040.00418.60
8.0.270.0040.00417.41
8.0.260.0040.00417.38
8.0.250.0080.00317.18
8.0.240.0040.00417.31
8.0.230.0030.00317.30
8.0.220.0030.00317.19
8.0.210.0000.00717.19
8.0.200.0070.00017.19
8.0.190.0000.00917.15
8.0.180.0050.00317.14
8.0.170.0000.00817.23
8.0.160.0040.00417.29
8.0.150.0050.00317.19
8.0.140.0080.00017.05
8.0.130.0060.00013.60
8.0.120.0090.00017.16
8.0.110.0000.00717.04
8.0.100.0070.00017.15
8.0.90.0040.00417.27
8.0.80.0040.01517.25
8.0.70.0040.00417.25
8.0.60.0050.00217.01
8.0.50.0040.00416.97
8.0.30.0130.00717.15
8.0.20.0110.00917.43
8.0.10.0040.00417.27
8.0.00.0100.00816.93
7.4.330.0000.00516.67
7.4.320.0030.00316.80
7.4.300.0000.00716.71
7.4.290.0050.00316.76
7.4.280.0000.00916.73
7.4.270.0050.00216.62
7.4.260.0080.00016.76
7.4.250.0000.00816.67
7.4.240.0040.00416.72
7.4.230.0000.00716.78
7.4.220.0150.00616.81
7.4.210.0070.01216.73
7.4.200.0000.00716.60
7.4.160.0140.00716.83
7.4.150.0070.01117.40
7.4.140.0080.01517.86
7.4.130.0130.01216.70
7.4.120.0100.01216.73
7.4.110.0130.01016.79
7.4.100.0130.01116.85
7.4.90.0120.00616.65
7.4.80.0120.00919.39
7.4.70.0080.00816.86
7.4.60.0130.00316.54
7.4.50.0030.01016.63
7.4.40.0090.01216.62
7.4.30.0100.01416.53
7.4.10.0110.00715.04
7.4.00.0080.00715.12
7.3.330.0050.00013.42
7.3.320.0030.00313.34
7.3.310.0070.00016.54
7.3.300.0030.00316.57
7.3.290.0000.00716.48
7.3.280.0100.01016.58
7.3.270.0110.00717.40
7.3.260.0130.00316.57
7.3.250.0080.01016.77
7.3.240.0100.01016.84
7.3.230.0080.01116.58
7.3.210.0090.00916.86
7.3.200.0090.00919.39
7.3.190.0100.00716.85
7.3.180.0090.00916.50
7.3.170.0080.00816.81
7.3.160.0030.01416.78
7.3.130.0050.01214.70
7.3.120.0100.00814.89
7.3.110.0080.00814.96
7.3.100.0070.00915.23
7.3.90.0070.00515.16
7.3.80.0070.00915.14
7.3.70.0060.01015.01
7.3.60.0080.00915.18
7.3.50.0080.00614.95
7.3.40.0060.00715.03
7.3.30.0110.00514.90
7.3.20.0090.00615.90
7.3.10.0070.00816.19
7.3.00.0120.00716.02
7.2.330.0100.00717.02
7.2.320.0110.00816.75
7.2.310.0070.01016.93
7.2.300.0090.00917.07
7.2.290.0110.01116.82
7.2.260.0090.00915.17
7.2.250.0120.00315.35
7.2.240.0090.00615.29
7.2.230.0080.00615.31
7.2.220.0070.00715.18
7.2.210.0110.00815.27
7.2.200.0060.01114.95
7.2.190.0030.01215.29
7.2.180.0050.00915.16
7.2.170.0080.00815.14
7.2.160.0100.00515.19
7.2.150.0090.00616.11
7.2.140.0080.00716.26
7.2.130.0110.00416.43
7.2.120.0060.00916.38
7.2.110.0110.00516.38
7.2.100.0140.00516.24
7.2.90.0100.00916.39
7.2.80.0090.00816.37
7.2.70.0120.00716.52
7.2.60.0100.00716.50
7.2.50.0080.01216.35
7.2.40.0080.01116.49
7.2.30.0170.00516.35
7.2.20.0100.00716.49
7.2.10.0100.00616.30
7.2.00.0060.00717.22
7.1.330.0100.01014.88
7.1.320.0080.01015.16
7.1.310.0170.00215.16
7.1.300.0100.00714.94
7.1.290.0130.00415.05
7.1.280.0080.00615.02
7.1.270.0130.00315.01
7.1.260.0120.00714.92
7.1.250.0100.00715.23
7.1.240.0300.00715.19
7.1.230.0080.00815.06
7.1.220.0130.00614.94
7.1.210.0100.01214.98
7.1.200.0100.00915.28
7.1.190.0090.00914.94
7.1.180.0050.01014.90
7.1.170.0150.00415.14
7.1.160.0110.00614.97
7.1.150.0130.00215.24
7.1.140.0060.01015.00
7.1.130.0070.01015.01
7.1.120.0070.00615.04
7.1.110.0070.01015.17
7.1.100.0080.01016.24
7.1.90.0110.00715.09
7.1.80.0130.00415.16
7.1.70.0110.00615.93
7.1.60.0090.01016.40
7.1.50.0070.00815.66
7.1.40.0150.00514.89
7.1.30.0080.01014.99
7.1.20.0060.01414.94
7.1.10.0080.00814.88
7.1.00.0090.02917.55
7.0.330.0090.00814.70
7.0.320.0100.00414.60
7.0.310.0100.00514.61
7.0.300.0090.00914.71
7.0.290.0050.00914.70
7.0.280.0050.00814.61
7.0.270.0100.00714.76
7.0.260.0070.01014.64
7.0.250.0080.01014.75
7.0.240.0100.00914.79
7.0.230.0080.01014.78
7.0.220.0410.00614.72
7.0.210.0070.00714.83
7.0.200.0080.00815.45
7.0.190.0070.00814.80
7.0.180.0110.00814.71
7.0.170.0060.01014.64
7.0.160.0130.00314.62
7.0.150.0060.00814.70
7.0.140.0100.00514.66
7.0.130.0060.01514.82
7.0.120.0780.00714.62
7.0.110.0080.00814.54
7.0.100.0030.01414.71
7.0.90.0110.00514.59
7.0.80.0160.00314.63
7.0.70.0080.00814.78
7.0.60.0170.02717.01
7.0.50.0130.02915.86
7.0.40.0030.03815.86
7.0.30.0160.02315.82
7.0.20.0080.02415.81
7.0.10.0060.03615.73
7.0.00.0070.03315.90
5.6.400.0060.00814.66
5.6.390.0100.00514.51
5.6.380.0130.00814.41
5.6.370.0030.01514.40
5.6.360.0100.00814.49
5.6.350.0110.00714.56
5.6.340.0060.01114.86
5.6.330.0090.00514.63
5.6.320.0120.00514.45
5.6.310.0110.00714.47
5.6.300.0070.00714.54
5.6.290.0070.01114.39
5.6.280.0050.02816.54
5.6.270.0110.00514.63
5.6.260.0130.00414.42
5.6.250.0080.01014.41
5.6.240.0130.00814.61
5.6.230.0100.00614.42
5.6.220.0090.00914.68
5.6.210.0100.01816.57
5.6.200.0060.02115.84
5.6.190.0060.02016.61
5.6.180.0250.02216.45
5.6.170.0120.02116.53
5.6.160.0100.03416.42
5.6.150.0080.03715.70
5.6.140.0100.01615.69
5.6.130.0060.02115.79
5.6.120.0060.02316.76
5.6.110.0110.02916.48
5.6.100.0100.02616.71
5.6.90.0060.02216.62
5.6.80.0090.02416.45
5.6.70.0130.00714.46
5.6.60.0070.01114.38
5.6.50.0110.00614.44
5.6.40.0050.01214.55
5.6.30.0080.00814.46
5.6.20.0130.01014.50
5.6.10.0100.01014.42
5.6.00.0080.01014.36
5.5.380.0100.00714.59
5.5.370.0080.00814.44
5.5.360.0110.00814.23
5.5.350.0130.03216.49
5.5.340.0080.02015.65
5.5.330.0100.01616.46
5.5.320.0210.02016.25
5.5.310.0170.01916.42
5.5.300.0060.02315.71
5.5.290.0070.03615.48
5.5.280.0090.01716.59
5.5.270.0120.02716.67
5.5.260.0090.03216.57
5.5.250.0070.02016.52
5.5.240.0080.03516.35
5.5.230.0090.00814.27
5.5.220.0050.01114.53
5.5.210.0140.00614.49
5.5.200.0070.00914.43
5.5.190.0080.00914.49
5.5.180.0080.01214.41
5.5.170.0160.00214.54
5.5.160.0090.01114.52
5.5.150.0040.01514.36
5.5.140.0150.00114.31
5.5.130.0040.01414.54
5.5.120.0090.01014.62
5.5.110.0150.00214.41
5.5.100.0090.00914.42
5.5.90.0100.01014.60
5.5.80.0080.00914.36
5.5.70.0070.01114.32
5.5.60.0050.01314.30
5.5.50.0100.00514.53
5.5.40.0040.00814.37
5.5.30.0060.01214.42
5.5.20.0110.00814.23
5.5.10.0120.00714.27
5.5.00.0120.00914.34

preferences:
46.33 ms | 401 KiB | 5 Q