3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*$original = date_default_timezone_set( 'Europe/Berlin'); $WordPress = date_default_timezone_set('UTC'); $tz = timezone_open( 'Asia/Tokyo' ); $date = date_create( '2025-07-30 22:30:00', $tz ); $thisyear = (int) date_format( $date, 'Y' ); $thismonth = (int) date_format( $date, 'm' ); $unixmonth = mktime( 0, 0, 0, $thismonth, 1, $thisyear ); // if set Europe/Berlin 1751320800 (+02:00) $last_day = gmdate( 't', $unixmonth ); var_dump($unixmonth, $thismonth, $last_day, $WordPress);*/ $date = strtotime( '2025-07-31 23:59:59' ); $year = date( 'Y', $date ); $month = date( 'm', $date ); $string = $year . '-' . $month . '-' . '01 00:00:00UTC'; $unixmonth = strtotime( $string ); $last_day = date( 't', $date ); var_dump( $unixmonth, $last_day ); ?>

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.5.10.0090.01018.27
8.5.00.0100.01020.11
8.4.160.0130.00923.98
8.4.150.0080.00416.88
8.4.140.0100.01117.50
8.4.130.0130.00919.38
8.4.120.0050.00322.15
8.4.110.0370.01117.81
8.4.100.0100.01217.70
8.4.90.0420.00917.50
8.4.80.0370.00717.81
8.4.70.0350.00517.61
8.4.60.0410.00917.75
8.4.50.0380.01117.34
8.4.40.0440.01117.23
8.4.30.0450.00917.61
8.4.20.0520.00817.32
8.4.10.0360.01117.93
8.3.280.0020.00014.05
8.3.270.0060.01216.76
8.3.260.0120.00816.72
8.3.250.0050.00317.04
8.3.240.0290.00617.21
8.3.230.0310.01016.37
8.3.220.0220.00516.56
8.3.210.0330.00916.44
8.3.200.0370.00516.71
8.3.190.0170.00516.61
8.3.180.0170.00516.46
8.3.170.0220.00416.38
8.3.160.0410.00716.73
8.3.150.0250.00716.71
8.3.140.0160.00716.67
8.3.130.0140.00616.82
8.3.120.0150.00616.45
8.3.110.0170.00316.68
8.3.100.0170.00516.35
8.3.90.0170.00616.65
8.3.80.0230.00416.50
8.3.70.0350.00416.73
8.3.60.0340.01116.54
8.3.50.0280.00516.46
8.3.40.0170.00417.50
8.3.30.0180.00517.76
8.3.20.0290.00517.65
8.3.10.0210.00617.68
8.3.00.0160.00417.39
8.2.290.0260.00316.57
8.2.280.0300.00716.75
8.2.270.0360.00616.30
8.2.260.0350.00716.18
8.2.250.0340.00816.40
8.2.240.0350.00616.27
8.2.230.0370.00516.28
8.2.220.0320.01016.62
8.2.210.0370.01016.26
8.2.200.0310.00816.06
8.2.190.0360.00716.42
8.2.180.0340.00916.61
8.2.170.0390.00817.66
8.2.160.0290.00417.74
8.2.150.0330.01117.67
8.2.140.0400.00517.72
8.2.130.0360.00917.63
8.2.120.0400.00717.48
8.2.110.0310.00917.68
8.2.100.0260.00517.80
8.2.90.0190.00117.73
8.2.80.0240.01117.75
8.2.70.0340.01017.71
8.2.60.0380.00517.63
8.2.50.0430.00817.42
8.2.40.0360.00417.40
8.2.30.0440.01117.21
8.2.20.0170.00417.58
8.2.10.0270.00717.53
8.2.00.0280.00717.65
8.1.330.0270.01316.15
8.1.320.0300.00616.04
8.1.310.0280.01115.91
8.1.300.0300.00816.07
8.1.290.0250.00416.19
8.1.280.0290.01116.08
8.1.270.0320.00917.50
8.1.260.0260.00917.22
8.1.250.0220.00517.55
8.1.240.0160.00717.36
8.1.230.0220.01017.36
8.1.220.0330.00817.45
8.1.210.0300.00817.21
8.1.200.0260.01417.18
8.1.190.0320.00717.39
8.1.180.0230.00517.48
8.1.170.0180.01017.50
8.1.160.0290.00817.27
8.1.150.0270.01117.38
8.1.140.0330.00617.57
8.1.130.0290.00817.26
8.1.120.0340.00417.57
8.1.110.0260.00617.38
8.1.100.0280.01017.65
8.1.90.0270.01117.43
8.1.80.0320.00617.28
8.1.70.0300.00817.55
8.1.60.0400.00817.36
8.1.50.0390.00417.36
8.1.40.0330.00817.47
8.1.30.0310.00717.65
8.1.20.0330.00817.52
8.1.10.0300.00817.30
8.1.00.0290.00617.46
8.0.300.0130.00416.86
8.0.290.0140.00316.84
8.0.280.0150.00216.75
8.0.270.0320.00816.87
8.0.260.0310.00816.84
8.0.250.0230.01016.86
8.0.240.0240.01216.89
8.0.230.0300.00416.96
8.0.220.0280.00816.73
8.0.210.0370.00816.68
8.0.200.0280.00716.71
8.0.190.0130.00516.79
8.0.180.0300.00416.95
8.0.170.0140.00316.93
8.0.160.0300.00816.70
8.0.150.0300.00916.78
8.0.140.0310.00816.80
8.0.130.0290.00916.74
8.0.120.0200.00616.71
8.0.110.0290.01016.79
8.0.100.0280.01116.51
8.0.90.0280.00916.64
8.0.80.0260.00816.70
8.0.70.0340.00416.80
8.0.60.0340.00716.77
8.0.50.0320.00916.70
8.0.30.0290.00716.66
8.0.20.0320.00916.98
8.0.10.0300.00916.72
8.0.00.0290.01016.95
7.4.330.0310.00616.44
7.4.320.0280.00916.30
7.4.300.0240.00916.40
7.4.290.0240.01416.53
7.4.280.0280.01216.21
7.4.270.0290.00516.36
7.4.260.0300.00716.39
7.4.250.0300.00416.34
7.4.240.0270.00616.41
7.4.230.0230.00216.22
7.4.220.0140.00516.38
7.4.210.0160.00116.39
7.4.200.0140.00416.41
7.4.190.0290.00516.07
7.4.180.0180.00616.52
7.4.160.0120.00516.25
7.4.150.0220.00216.14
7.4.140.0230.00516.31
7.4.130.0120.00416.25
7.4.120.0140.00316.39
7.4.110.0130.00416.36
7.4.100.0120.00316.18
7.4.90.0150.00216.23
7.4.80.0120.00316.45
7.4.70.0120.00416.21
7.4.60.0140.00216.16
7.4.50.0140.00216.16
7.4.40.0310.00416.00
7.4.30.0360.00816.13
7.4.20.0310.00916.06
7.4.10.0320.00416.21
7.4.00.0310.00616.21
7.3.330.0330.00516.04
7.3.320.0210.00516.39
7.3.310.0110.00516.10
7.3.300.0310.00516.38
7.3.290.0290.00616.20
7.3.280.0330.00716.10
7.3.270.0190.00716.45
7.3.260.0120.00416.10
7.3.250.0260.00816.17
7.3.240.0280.00616.14
7.3.230.0260.00816.10
7.3.220.0360.00515.88
7.3.210.0250.00816.17
7.3.200.0290.00616.10
7.3.190.0240.00516.18
7.3.180.0290.00816.25
7.3.170.0260.01116.58
7.3.160.0290.00516.06
7.3.150.0170.00616.01
7.3.140.0120.00416.05
7.3.130.0130.00616.16
7.3.120.0140.00316.02
7.3.110.0300.00416.23
7.3.100.0260.00315.95
7.3.90.0250.00516.37
7.3.80.0130.00316.28
7.3.70.0120.00316.11
7.3.60.0210.00316.41
7.3.50.0250.00616.25
7.3.40.0260.00816.23
7.3.30.0380.00516.35
7.3.20.0360.00616.15
7.3.10.0310.00816.02
7.3.00.0340.00716.23
7.2.340.0310.00716.20
7.2.330.0310.00915.96
7.2.320.0240.00816.42
7.2.310.0250.00816.21
7.2.300.0310.00816.14
7.2.290.0210.00416.16
7.2.280.0240.00716.45
7.2.270.0180.00316.56
7.2.260.0170.00216.03
7.2.250.0140.00516.59
7.2.240.0330.00516.25
7.2.230.0220.00716.24
7.2.220.0180.00516.55
7.2.210.0170.00816.50
7.2.200.0240.00916.29
7.2.190.0220.01016.42
7.2.180.0280.00716.13
7.2.170.0310.01016.24
7.2.160.0290.00416.13
7.2.150.0410.00316.31
7.2.140.0300.00616.46
7.2.130.0200.00816.60
7.2.120.0130.00416.41
7.2.110.0170.00516.62
7.2.100.0330.00916.25
7.2.90.0350.00616.52
7.2.80.0280.00516.38
7.2.70.0300.00916.29
7.2.60.0330.00616.41
7.2.50.0310.00716.43
7.2.40.0300.00816.45
7.2.30.0210.00416.59
7.2.20.0280.01116.40
7.2.10.0260.01116.46
7.2.00.0290.00716.57
7.1.330.0290.00615.36
7.1.320.0270.00715.48
7.1.310.0270.00615.43
7.1.300.0290.00515.37
7.1.290.0300.00415.08
7.1.280.0290.00515.75
7.1.270.0280.00615.53
7.1.260.0280.00715.31
7.1.250.0280.00615.34
7.1.240.0250.00615.46
7.1.230.0270.00815.25
7.1.220.0280.00515.43
7.1.210.0240.00915.68
7.1.200.0300.00315.56
7.1.190.0320.00415.46
7.1.180.0280.00715.57
7.1.170.0280.00315.34
7.1.160.1020.00515.52
7.1.150.0130.00415.72
7.1.140.0130.00315.42
7.1.130.0130.00315.34
7.1.120.0150.00015.54
7.1.110.0120.00415.52
7.1.100.0210.00615.41
7.1.90.0110.00515.40
7.1.80.0160.00115.69
7.1.70.0120.00415.50
7.1.60.0260.00515.23
7.1.50.0290.00415.33
7.1.40.0150.00215.30
7.1.30.0150.00215.41
7.1.20.0150.00115.32
7.1.10.0280.00715.50
7.1.00.0310.00615.41
7.0.330.0270.01015.15
7.0.320.0130.00315.18
7.0.310.0180.00614.94
7.0.300.0280.00714.88
7.0.290.0110.00615.28
7.0.280.0680.00814.94
7.0.270.0280.00514.93
7.0.260.0290.00615.01
7.0.250.0270.00815.18
7.0.240.0270.00715.54
7.0.230.0270.00715.38
7.0.220.0260.00915.30
7.0.210.0280.00715.28
7.0.200.0270.01115.16
7.0.190.0280.00715.53
7.0.180.0320.00415.28
7.0.170.0310.00715.14
7.0.160.0300.00615.12
7.0.150.0280.00715.02
7.0.140.0310.00415.23
7.0.130.0310.00715.18
7.0.120.0280.00814.98
7.0.110.0260.00915.19
7.0.100.0240.00815.24
7.0.90.0300.00514.92
7.0.80.0290.00814.98
7.0.70.0280.00615.28
7.0.60.0780.00415.25
7.0.50.0270.00715.08
7.0.40.0290.00615.35
7.0.30.0320.00315.35
7.0.20.0320.00415.33
7.0.10.0300.00515.28
7.0.00.0280.00714.89
5.6.400.0260.00815.55
5.6.390.0250.00815.85
5.6.380.0240.00815.75
5.6.370.0230.00915.75
5.6.360.0270.00715.62
5.6.350.0250.00715.75
5.6.340.0320.00415.63
5.6.330.0100.00515.77
5.6.320.0230.00715.53
5.6.310.0320.00515.79
5.6.300.0240.00915.52
5.6.290.0240.00815.88
5.6.280.0220.00415.88
5.6.270.0090.00615.84
5.6.260.0100.00415.76
5.6.250.0100.00415.54
5.6.240.0240.00715.71
5.6.230.0250.00715.72
5.6.220.0240.00415.91
5.6.210.0250.00715.84
5.6.200.0260.00715.68
5.6.190.0240.00616.09
5.6.180.0130.00615.93
5.6.170.0100.00515.91
5.6.160.0210.00415.95
5.6.150.0270.00715.87
5.6.140.0190.00515.95
5.6.130.0170.00015.91
5.6.120.0130.00215.75
5.6.110.0200.00515.76
5.6.100.0200.00815.85
5.6.90.0280.00415.84
5.6.80.0230.00815.63
5.6.70.0250.00715.85
5.6.60.0230.00815.86
5.6.50.0250.00615.70
5.6.40.0230.00715.93
5.6.30.0230.00715.62
5.6.20.0320.00915.46
5.6.10.0290.00415.51
5.6.00.0220.00815.58
5.5.380.0250.00215.82
5.5.370.0200.01115.82
5.5.360.0210.01115.59
5.5.350.0250.00515.83
5.5.340.0150.00615.83
5.5.330.0110.00315.58
5.5.320.0220.00515.67
5.5.310.0220.00315.53
5.5.300.0200.00515.58
5.5.290.0240.00215.67
5.5.280.0140.00215.68
5.5.270.0240.00615.46
5.5.260.0110.00515.60
5.5.250.0190.00115.77
5.5.240.0270.00415.75
5.5.230.0280.00516.02
5.5.220.0200.00315.70
5.5.210.0200.00815.63
5.5.200.0250.00715.76
5.5.190.0240.00815.59
5.5.180.0240.00815.57
5.5.170.0220.00715.35
5.5.160.0220.00915.71
5.5.150.0260.00415.35
5.5.140.0250.00515.57
5.5.130.0200.00615.34
5.5.120.0120.00415.69
5.5.110.0240.00815.43
5.5.100.0250.00615.90
5.5.90.0220.00515.34
5.5.80.0310.00315.55
5.5.70.0200.00715.79
5.5.60.0240.00315.73
5.5.50.0230.00715.88
5.5.40.0210.00615.88
5.5.30.0230.00315.53
5.5.20.0180.01115.99
5.5.10.0220.00415.52
5.5.00.0220.00315.35
5.4.450.0200.00413.93
5.4.440.0200.00513.93
5.4.430.0190.00413.93
5.4.420.0100.00713.93
5.4.410.0190.00613.93
5.4.400.0200.00513.93
5.4.390.0180.00613.93
5.4.380.0190.00513.93
5.4.370.0200.00513.93
5.4.360.0190.00613.93
5.4.350.0170.00613.93
5.4.340.0150.00913.93
5.4.330.0220.00413.93
5.4.320.0170.00813.93
5.4.310.0230.00113.93
5.4.300.0240.00413.93
5.4.290.0200.00713.93
5.4.280.0230.00613.93
5.4.270.0160.00813.93
5.4.260.0160.00513.93
5.4.250.0210.00313.93
5.4.240.0200.00513.93
5.4.230.0190.00513.93
5.4.220.0070.00413.93
5.4.210.0080.00313.93
5.4.200.0200.00413.93
5.4.190.0190.00413.93
5.4.180.0180.00613.93
5.4.170.0200.00313.93
5.4.160.0170.00513.93
5.4.150.0190.00513.93
5.4.140.0160.00713.93
5.4.130.0190.00513.93
5.4.120.0210.00413.93
5.4.110.0210.00313.93
5.4.100.0200.00313.93
5.4.90.0130.01013.93
5.4.80.0180.00713.93
5.4.70.0220.00313.93
5.4.60.0180.00513.93
5.4.50.0110.00213.93
5.4.40.0090.00313.93
5.4.30.0090.00313.93
5.4.20.0060.00413.93
5.4.10.0080.00213.93
5.4.00.0160.00413.93
5.3.290.0150.00313.93
5.3.280.0070.00613.93
5.3.270.0070.00413.93
5.3.260.0080.00313.93
5.3.250.0120.00413.93
5.3.240.0180.00713.93
5.3.230.0180.00513.93
5.3.220.0140.00413.93
5.3.210.0190.00213.93
5.3.200.0110.00313.93
5.3.190.0090.00213.93
5.3.180.0170.00813.93
5.3.170.0190.00513.93
5.3.160.0140.00813.93
5.3.150.0190.00713.93
5.3.140.0190.00613.93
5.3.130.0190.00513.93
5.3.120.0170.00713.93
5.3.110.0200.00513.93
5.3.100.0160.00913.93
5.3.90.0200.00513.93
5.3.80.0170.00813.93
5.3.70.0210.00513.93
5.3.60.0220.00613.93
5.3.50.0190.00513.93
5.3.40.0190.00613.93
5.3.30.0180.00613.93
5.3.20.0160.00713.93
5.3.10.0200.00513.93
5.3.00.0180.00513.93
5.2.170.0150.00213.93
5.2.160.0070.00213.93
5.2.150.0080.00413.93
5.2.140.0150.00313.93
5.2.130.0170.00413.93
5.2.120.0150.00613.93
5.2.110.0170.00313.93
5.2.100.0150.00813.93
5.2.90.0140.00713.93
5.2.80.0180.00313.93
5.2.70.0160.00513.93
5.2.60.0140.00713.93
5.2.50.0160.00513.93
5.2.40.0200.00513.93
5.2.30.0150.00513.93
5.2.20.0180.00213.93
5.2.10.0160.00413.93
5.2.00.0120.00713.93
5.1.60.0150.00313.93
5.1.50.0140.00513.93
5.1.40.0170.00313.93
5.1.30.0120.00713.93
5.1.20.0140.00313.93
5.1.10.0130.00613.93
5.1.00.0130.00513.93
5.0.50.0100.00313.93
5.0.40.0110.00413.93
5.0.30.0120.00513.93
5.0.20.0140.00213.93
5.0.10.0120.00413.93
5.0.00.0110.00413.93
4.4.90.0080.00113.93
4.4.80.0070.00213.93
4.4.70.0070.00213.93
4.4.60.0090.00013.93
4.4.50.0070.00213.93
4.4.40.0090.00013.93
4.4.30.0080.00113.93
4.4.20.0090.00013.93
4.4.10.0080.00113.93
4.4.00.0090.00113.93
4.3.110.0090.00013.93
4.3.100.0090.00113.93
4.3.90.0080.00113.93
4.3.80.0070.00213.93
4.3.70.0090.00013.93
4.3.60.0060.00313.93
4.3.50.0080.00113.93
4.3.40.0090.00013.93
4.3.30.0050.00213.93
4.3.20.0060.00113.93
4.3.10.0050.00213.93
4.3.00.0050.00213.93

preferences:
84.84 ms | 403 KiB | 5 Q