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.1.70.0000.00717.71
8.1.60.0080.00017.84
8.1.50.0030.00517.70
8.1.40.0050.00317.63
8.1.30.0000.00817.88
8.1.20.0040.00417.87
8.1.10.0030.00517.64
8.1.00.0090.00017.68
8.0.200.0000.00717.24
8.0.190.0070.00017.29
8.0.180.0080.00017.23
8.0.170.0030.00617.14
8.0.160.0040.00417.15
8.0.150.0000.00717.08
8.0.140.0050.00217.14
8.0.130.0030.00313.60
8.0.120.0070.00017.16
8.0.110.0000.00717.09
8.0.100.0070.00017.07
8.0.90.0060.00317.06
8.0.80.0030.01717.22
8.0.70.0000.00717.07
8.0.60.0050.00217.06
8.0.50.0030.00617.20
8.0.30.0110.00617.54
8.0.20.0100.01017.50
8.0.10.0000.00717.30
8.0.00.0160.00317.00
7.4.300.0000.00616.88
7.4.290.0040.00416.80
7.4.280.0000.00816.73
7.4.270.0030.00316.72
7.4.260.0000.00513.61
7.4.250.0050.00316.80
7.4.240.0010.00716.78
7.4.230.0040.00416.81
7.4.220.0040.00416.79
7.4.210.0090.00716.78
7.4.200.0070.00016.86
7.4.130.0130.00816.85
7.4.120.0120.00616.67
7.4.110.0090.00616.74
7.4.100.0030.01416.61
7.4.90.0070.01216.83
7.4.80.0140.00419.39
7.4.70.0120.00916.75
7.4.60.0060.00916.82
7.4.50.0040.01116.45
7.4.40.0100.00716.71
7.4.20.0130.01016.71
7.4.10.0090.01416.52
7.4.00.0130.01016.93
7.3.330.0070.00016.68
7.3.320.0030.00313.29
7.3.310.0000.00716.64
7.3.300.0000.00716.46
7.3.290.0080.00916.53
7.3.280.0000.01616.52
7.3.260.0080.01216.41
7.3.240.0090.00916.76
7.3.230.0100.00716.94
7.3.210.0100.00716.79
7.3.200.0160.00716.82
7.3.190.0180.01917.03
7.3.180.0140.00316.41
7.3.170.0200.01016.64
7.3.160.0120.00616.55
7.3.140.0030.01916.69
7.3.130.0110.01416.54
7.3.120.0100.01216.52
7.3.110.0100.01316.39
7.3.100.0130.01016.45
7.3.90.0000.00016.61
7.3.80.0030.02416.76
7.3.70.0150.00816.45
7.3.60.0060.00616.70
7.3.50.0050.01816.30
7.3.40.0140.00916.57
7.3.30.0120.00916.57
7.3.20.0060.01716.62
7.3.10.0150.00916.35
7.3.00.0140.00916.42
7.2.330.0200.00016.96
7.2.320.0090.00916.90
7.2.310.0060.01316.86
7.2.300.0030.01617.05
7.2.290.0030.01616.77
7.2.270.0090.01516.75
7.2.260.0160.00916.95
7.2.250.0130.00616.89
7.2.240.0170.00616.84
7.2.230.0130.01116.68
7.2.220.0040.00416.90
7.2.210.0110.01416.56
7.2.200.0150.01416.58
7.2.190.0180.00616.72
7.2.180.0230.00016.57
7.2.170.0110.01416.59
7.2.160.0070.01716.83
7.2.150.0140.01116.50
7.2.140.0150.01016.79
7.2.130.0200.00316.69
7.2.120.0130.00916.66
7.2.110.0150.01216.62
7.2.100.0260.01716.76
7.2.90.0140.01116.60
7.2.80.0360.00716.72
7.2.70.0160.01016.70
7.2.60.0120.01216.63
7.2.50.0070.01616.77
7.2.40.0120.01216.78
7.2.30.0120.01016.69
7.2.20.0120.00916.78
7.2.10.0110.00916.85
7.2.00.0130.00616.79
7.1.330.0200.01515.85
7.1.320.0270.01215.77
7.1.310.0230.01115.70
7.1.300.0180.01015.82
7.1.290.0240.00915.78
7.1.280.0240.00615.82
7.1.270.0230.01015.88
7.1.260.0200.01315.84
7.1.250.0190.01215.64
7.1.240.0210.00815.81
7.1.230.0200.01115.69
7.1.220.0180.01415.84
7.1.210.0200.00915.83
7.1.200.0240.01015.64
7.1.190.0190.01315.79
7.1.180.0240.00615.75
7.1.170.0280.00315.80
7.1.160.0200.00815.66
7.1.150.0200.00615.82
7.1.140.0130.01015.88
7.1.130.0190.00315.57
7.1.120.0190.00415.58
7.1.110.0070.01515.78
7.1.100.0180.00315.49
7.1.90.0160.00815.52
7.1.80.0200.00815.76
7.1.70.0340.01215.36
7.1.60.0160.00415.58
7.1.50.0350.00715.81
7.1.40.0230.00715.71
7.1.30.0170.00715.78
7.1.20.0160.00715.59
7.1.10.0160.00815.74
7.1.00.0200.00015.73
7.0.330.0210.00915.58
7.0.320.0090.02215.63
7.0.310.0180.00915.35
7.0.300.0140.01215.39
7.0.290.0060.01815.21
7.0.280.0120.00915.35
7.0.270.0100.01315.43
7.0.260.0160.00415.49
7.0.250.0060.01515.34
7.0.240.0100.01015.58
7.0.230.0120.00815.41
7.0.220.0080.01415.34
7.0.210.0090.01615.55
7.0.200.0170.00315.24
7.0.190.0270.00315.28
7.0.180.0190.00815.50
7.0.170.0160.01015.52
7.0.160.0130.00815.30
7.0.150.0130.00815.33
7.0.140.0100.01015.31
7.0.130.0160.01115.33
7.0.120.0090.01615.08
7.0.110.0170.00715.41
7.0.100.0130.00815.51
7.0.90.0120.00815.40
7.0.80.0180.01015.41
7.0.70.0130.01315.46
7.0.60.0180.00815.49
7.0.50.0150.00815.42
7.0.40.0180.00615.36
7.0.30.0090.00915.30
7.0.20.0160.01115.38
7.0.10.0030.01715.44
7.0.00.0180.00315.34
5.6.400.0250.00815.84
5.6.390.0140.01716.34
5.6.380.0170.01716.04
5.6.370.0090.02216.18
5.6.360.0130.01616.29
5.6.350.0080.01716.13
5.6.340.0140.00816.18
5.6.330.0090.01515.84
5.6.320.0100.01316.35
5.6.310.0150.00916.02
5.6.300.0150.01516.20
5.6.290.0100.01416.18
5.6.280.0070.01716.07
5.6.270.0250.00616.14
5.6.260.0140.01216.05
5.6.250.0230.01016.24
5.6.240.0130.01716.17
5.6.230.0150.01516.16
5.6.220.0080.01916.09
5.6.210.0160.01216.18
5.6.200.0160.00615.78
5.6.190.0150.01215.98
5.6.180.0090.01216.17
5.6.170.0120.00915.82
5.6.160.0110.01216.19
5.6.150.0130.00915.77
5.6.140.0160.00815.98
5.6.130.0140.01416.13
5.6.120.0110.01516.14
5.6.110.0130.01616.27
5.6.100.0170.01016.03
5.6.90.0200.01015.99
5.6.80.0190.00315.86
5.6.70.0200.00715.95
5.6.60.0100.01716.02
5.6.50.0140.01416.02
5.6.40.0130.01715.94
5.6.30.0180.01216.04
5.6.20.0160.01015.96
5.6.10.0120.01716.10
5.6.00.0060.01716.18
5.5.380.0100.01316.26
5.5.370.0070.01415.96
5.5.360.0180.01016.09
5.5.350.0090.01716.06
5.5.340.0180.00616.17
5.5.330.0150.00716.10
5.5.320.0070.01416.36
5.5.310.0090.01316.01
5.5.300.0100.01316.04
5.5.290.0000.02716.00
5.5.280.0130.01516.28
5.5.270.0150.01216.15
5.5.260.0260.00016.12
5.5.250.0150.01116.02
5.5.240.0150.00615.88
5.5.230.0090.01515.86
5.5.220.0120.01715.98
5.5.210.0200.00715.86
5.5.200.0120.01516.11
5.5.190.0120.01115.86
5.5.180.0190.00916.11
5.5.170.0130.01315.95
5.5.160.0190.01015.91
5.5.150.0090.01416.04
5.5.140.0150.01215.99
5.5.130.0180.00316.00
5.5.120.0170.00515.93
5.5.110.0060.01516.30
5.5.100.0200.00716.05
5.5.90.0110.01116.05
5.5.80.0150.01116.13
5.5.70.0080.01515.91
5.5.60.0160.00816.00
5.5.50.0100.01315.81
5.5.40.0110.01215.88
5.5.30.0140.01115.70
5.5.20.0160.00815.73
5.5.10.0150.01115.96
5.5.00.0080.02015.91
5.4.450.0150.00412.89
5.4.440.0190.00012.93
5.4.430.0130.00412.75
5.4.420.0110.01112.82
5.4.410.0090.00713.00
5.4.400.0110.00712.94
5.4.390.0100.01312.63
5.4.380.0130.00712.73
5.4.370.0110.01212.74
5.4.360.0130.00412.71
5.4.350.0050.01612.70
5.4.340.0130.00613.05
5.4.330.0110.01112.77
5.4.320.0140.00312.81
5.4.310.0060.01312.75
5.4.300.0070.01212.86
5.4.290.0090.00612.73
5.4.280.0080.00812.90
5.4.270.0060.01112.76
5.4.260.0080.00612.83
5.4.250.0100.00712.59
5.4.240.0090.00612.67
5.4.230.0100.00712.91
5.4.220.0110.01112.68
5.4.210.0140.00412.74
5.4.200.0180.00312.70
5.4.190.0170.00312.56
5.4.180.0120.00912.77
5.4.170.0110.00712.64
5.4.160.0140.00412.76
5.4.150.0140.00612.53
5.4.140.0180.00012.80
5.4.130.0110.00612.73
5.4.120.0150.00312.55
5.4.110.0040.01312.71
5.4.100.0040.01712.94
5.4.90.0100.01112.86
5.4.80.0160.00912.83
5.4.70.0160.00512.65
5.4.60.0090.00912.67
5.4.50.0100.01312.57
5.4.40.0140.00712.59
5.4.30.0150.00712.60
5.4.20.0120.00512.58
5.4.10.0160.00412.76
5.4.00.0070.01012.64
5.3.290.0090.01313.37
5.3.280.0040.01713.20
5.3.270.0050.01813.21
5.3.260.0160.01013.61
5.3.250.0150.00813.22
5.3.240.0100.01613.32
5.3.230.0120.01213.14
5.3.220.0090.01213.08
5.3.210.0150.00913.05
5.3.200.0120.01613.20
5.3.190.0150.00913.14
5.3.180.0090.01913.27
5.3.170.0120.00913.50
5.3.160.0150.01113.23
5.3.150.0130.01013.27
5.3.140.0130.00913.16
5.3.130.0160.00713.28
5.3.120.0160.00913.13
5.3.110.0120.01013.28
5.3.100.0160.01013.31
5.3.90.0100.01013.15
5.3.80.0090.01212.89
5.3.70.0090.01213.09
5.3.60.0110.00813.14
5.3.50.0080.01513.09
5.3.40.0080.01113.25
5.3.30.0080.01713.38
5.3.20.0100.01413.05
5.3.10.0090.01313.18
5.3.00.0140.00313.08
5.2.170.0060.01612.27
5.2.160.0110.01112.52
5.2.150.0090.01112.43
5.2.140.0120.00912.21
5.2.130.0140.00812.15
5.2.120.0070.01412.16
5.2.110.0140.00312.11
5.2.100.0060.01312.16
5.2.90.0070.01412.16
5.2.80.0110.00612.05
5.2.70.0120.00412.02
5.2.60.0110.01112.03
5.2.50.0140.00312.03
5.2.40.0090.00912.09
5.2.30.0150.00611.89
5.2.20.0130.00811.83
5.2.10.0040.01511.96
5.2.00.0080.01211.80
5.1.60.0070.01011.10
5.1.50.0120.00211.07
5.1.40.0100.01011.21
5.1.30.0120.00311.49
5.1.20.0040.01311.25
5.1.10.0130.00311.50
5.1.00.0110.00811.17
5.0.50.0050.01010.39
5.0.40.0120.00410.39
5.0.30.0060.00910.39
5.0.20.0100.00810.39
5.0.10.0090.00410.39
5.0.00.0080.00810.39
4.4.90.0110.00010.39
4.4.80.0060.00310.39
4.4.70.0070.00310.39
4.4.60.0030.00710.39
4.4.50.0030.00710.39
4.4.40.0040.00410.39
4.4.30.0080.00010.39
4.4.20.0040.00710.39
4.4.10.0060.00210.39
4.4.00.0000.00910.39
4.3.110.0040.00410.39
4.3.100.0070.00010.39
4.3.90.0040.00410.39
4.3.80.0100.00010.39
4.3.70.0080.00010.39
4.3.60.0030.00810.39
4.3.50.0080.00410.39
4.3.40.0030.00710.39
4.3.30.0000.00810.39
4.3.20.0040.00410.39
4.3.10.0030.00610.39
4.3.00.0000.00910.39

preferences:
12.84 ms | 406 KiB | 5 Q