3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link https://stackoverflow.com/a/13129856/367456 */ $formats = array( 'today midnight', 'midnight', 'today', 'TODAY', 'MidNight', 'ToDaY', 'tomorrow', 'UTC today', 'today Z', 'today Europe/Berlin', 'Asia/Shanghai today', 'Asia/Shanghai', 'HKST today', ); $time = strtotime('UTC 2020-01-01 00:00:00'); printf("UTC time is: %d (script-time, is UTC 2020-01-01 00:00:00)\n", $time); if (is_callable('date_default_timezone_get')) { printf("default time-zone is: %s\n", date_default_timezone_get()); } else { printf("default time-zone is: %s\n", '???'); } foreach ($formats as $format) { printf("%'.-24s: %s\n", "$format ", strtotime($format, $time)); }

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.130.0120.00817.77
8.4.120.0120.00820.45
8.4.110.0050.00422.50
8.4.100.0150.00517.92
8.4.90.0110.00820.53
8.4.80.0120.00719.15
8.4.70.0110.00918.07
8.4.60.0060.00319.07
8.4.50.0100.00919.92
8.4.40.0060.00319.71
8.4.30.0060.00320.73
8.4.20.0140.00717.93
8.4.10.0090.00019.67
8.3.260.0130.00716.88
8.3.250.0140.00518.76
8.3.240.0120.00716.56
8.3.230.0040.00416.70
8.3.220.0130.00318.97
8.3.210.0090.00916.69
8.3.200.0030.00516.91
8.3.190.0100.00917.31
8.3.180.0120.00716.67
8.3.170.0070.01019.15
8.3.160.0070.01118.80
8.3.150.0140.00420.77
8.3.140.0000.01018.56
8.3.130.0070.01318.62
8.3.120.0120.00320.87
8.3.110.0050.00316.78
8.3.100.0030.00716.71
8.3.90.0090.00626.77
8.3.80.0230.00623.92
8.3.70.0280.00324.69
8.3.60.0240.01024.63
8.3.50.0090.00626.16
8.3.40.0240.00524.78
8.3.30.0250.00224.90
8.3.20.0160.01325.95
8.3.10.0170.00726.37
8.3.00.0170.00326.39
8.2.290.0080.00116.91
8.2.280.0130.00618.61
8.2.270.0030.01217.33
8.2.260.0080.00418.84
8.2.250.0060.00318.45
8.2.240.0090.00618.83
8.2.230.0030.00620.94
8.2.220.0110.00424.06
8.2.210.0080.00026.77
8.2.200.0160.00623.92
8.2.190.0220.00723.73
8.2.180.0140.00728.38
8.2.170.0160.00824.94
8.2.160.0160.00726.90
8.2.150.0100.00728.25
8.2.140.0140.00127.75
8.2.130.0080.00528.50
8.2.120.0100.00528.50
8.2.110.0110.00425.57
8.2.100.0100.00524.39
8.2.90.0070.00624.50
8.2.80.0120.00424.45
8.2.70.0120.00224.45
8.2.60.0140.00724.53
8.2.50.0190.00424.47
8.2.40.0170.00725.14
8.2.30.0130.00525.09
8.2.20.0110.00624.47
8.2.10.0120.00225.21
8.2.00.0100.00325.17
8.1.330.0120.00716.55
8.1.320.0110.00816.13
8.1.310.0090.00916.73
8.1.300.0060.00320.40
8.1.290.0120.00330.84
8.1.280.0150.00628.38
8.1.270.0090.00525.79
8.1.260.0100.00428.59
8.1.250.0110.00829.46
8.1.240.0110.00325.15
8.1.230.0180.00225.91
8.1.220.0090.00324.30
8.1.210.0070.00524.80
8.1.200.0110.00224.22
8.1.190.0180.00524.22
8.1.180.0080.00624.47
8.1.170.0090.00424.77
8.1.160.0120.00125.01
8.1.150.0150.00724.91
8.1.140.0040.00825.91
8.1.130.0100.00225.56
8.1.120.0110.00224.29
8.1.110.0100.00224.29
8.1.100.0050.00824.23
8.1.90.0110.00424.30
8.1.80.0160.00824.30
8.1.70.0180.00324.28
8.1.60.0170.00424.34
8.1.50.0190.00624.27
8.1.40.0180.00424.23
8.1.30.0120.00724.36
8.1.20.0180.00424.35
8.1.10.0110.00424.24
8.1.00.0120.00324.26
8.0.300.0070.00525.53
8.0.290.0100.00523.92
8.0.280.0110.00224.66
8.0.270.0070.00723.97
8.0.260.0150.00725.44
8.0.250.0140.00923.98
8.0.240.0110.00423.97
8.0.230.0100.00723.99
8.0.220.0150.00824.04
8.0.210.0130.00424.03
8.0.200.0160.00724.04
8.0.190.0160.00724.06
8.0.180.0160.00524.04
8.0.170.0160.00423.99
8.0.160.0170.00423.99
8.0.150.0150.00623.96
8.0.140.0150.00623.99
8.0.130.0280.00522.22
8.0.120.0190.00424.00
8.0.110.0170.00623.96
8.0.100.0150.00223.96
8.0.90.0140.00623.95
8.0.80.0120.01421.76
8.0.70.0140.00923.95
8.0.60.0170.00523.95
8.0.50.0180.00824.02
8.0.30.0210.00824.19
8.0.20.0210.01021.94
8.0.10.0130.01024.07
8.0.00.0210.00423.92
7.4.330.0170.00423.86
7.4.320.0060.01123.78
7.4.300.0110.00623.86
7.4.290.0160.00323.82
7.4.280.0110.00823.78
7.4.270.0100.00623.78
7.4.260.0090.00622.22
7.4.250.0080.00523.82
7.4.240.0060.00421.46
7.4.230.0100.00223.82
7.4.220.0070.00221.47
7.4.210.0110.00520.30
7.4.200.0080.00323.85
7.4.190.0070.00730.84
7.4.180.0130.00330.84
7.4.160.0260.00430.84
7.4.150.0320.00430.84
7.4.140.0200.00730.84
7.4.130.0170.00821.51
7.4.120.0210.00523.75
7.4.110.0210.00323.79
7.4.100.0180.00723.72
7.4.90.0170.00823.83
7.4.80.0170.00725.12
7.4.70.0200.00823.79
7.4.60.0170.00823.83
7.4.50.0170.00723.64
7.4.40.0190.00823.77
7.4.30.0240.00730.84
7.4.20.0210.00823.77
7.4.10.0190.00923.68
7.4.00.0170.00523.88
7.3.330.0110.00123.76
7.3.320.0130.00322.06
7.3.310.0100.00823.74
7.3.300.0030.00823.65
7.3.290.0120.00920.11
7.3.280.0160.01023.68
7.3.270.0280.00330.84
7.3.260.0170.00723.62
7.3.250.0270.00330.84
7.3.240.0120.00819.58
7.3.230.0150.00623.89
7.3.220.0230.00030.84
7.3.210.0100.00623.81
7.3.200.0240.00523.83
7.3.190.0240.01223.93
7.3.180.0240.00523.62
7.3.170.0240.01023.74
7.3.160.0210.00723.69
7.3.150.0280.00630.84
7.3.140.0190.01123.76
7.3.130.0160.01023.69
7.3.120.0120.00623.68
7.3.110.0100.00923.61
7.3.100.0130.00623.64
7.3.90.0080.00023.72
7.3.80.0120.01223.80
7.3.70.0190.00623.64
7.3.60.0160.00823.77
7.3.50.0230.00923.57
7.3.40.0240.00723.71
7.3.30.0160.01123.71
7.3.20.0170.01223.73
7.3.10.0240.00623.59
7.3.00.0200.00923.63
7.2.340.0240.00930.84
7.2.330.0250.00223.90
7.2.320.0150.01023.87
7.2.310.0180.01023.85
7.2.300.0140.00823.95
7.2.290.0080.01023.80
7.2.280.0150.00430.84
7.2.270.0160.00923.79
7.2.260.0170.00623.89
7.2.250.0130.00523.86
7.2.240.0150.00423.84
7.2.230.0150.00623.76
7.2.220.0080.00423.87
7.2.210.0210.01323.70
7.2.200.0170.01223.71
7.2.190.0240.00623.78
7.2.180.0250.00223.70
7.2.170.0190.00923.71
7.2.160.0130.01223.83
7.2.150.0120.00823.67
7.2.140.0130.00723.81
7.2.130.0150.00523.76
7.2.120.0100.00823.75
7.2.110.0110.01023.73
7.2.100.0170.01323.80
7.2.90.0180.00723.72
7.2.80.0300.00923.78
7.2.70.0230.00823.77
7.2.60.0210.01323.73
7.2.50.0120.01323.80
7.2.40.0100.01123.81
7.2.30.0120.00723.76
7.2.20.0120.00623.81
7.2.10.0110.00723.84
7.2.00.0130.00423.81

preferences:
33.76 ms | 403 KiB | 5 Q