3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timezone = new DateTimeZone( "UTC" ); $fmj = DateInterval::createFromDateString( 'first Monday of January next year' ); //Monday from start 2019 only $period = new DatePeriod( new DateTime( '2019-01-01 00:00:00.000000', $timezone ), $fmj, new DateTime( '2022-01-11 00:00:00.000000', $timezone ) ); //$period->current= new \DateTime('2019-05-06 00:00:00', new \DateTimeZone('UTC')); $y = 0; foreach ( $period as $dt ) { $c[] = $period; $display[$y++] = $dt->format( "l Y-m-d H:i:s" ); //stop total_recurrence if( $y == 5 ) { break; } } $var = new DateTime( 'first monday of January', new DateTimeZone( "UTC" )); $display[5] = $var->format( "l Y-m-d H:i:s" ); var_dump( $display, $fmj, $c);

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.55
8.3.50.0060.00816.46
8.3.40.0100.01018.92
8.3.30.0060.00918.97
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.180.0070.01425.92
8.2.170.0090.00619.07
8.2.160.0130.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00026.16
8.2.110.0060.00320.77
8.2.100.0070.00418.03
8.2.90.0000.00818.06
8.2.80.0030.00620.66
8.2.70.0040.00417.75
8.2.60.0040.00417.88
8.2.50.0000.00818.00
8.2.40.0030.00619.53
8.2.30.0000.00818.21
8.2.20.0050.00218.15
8.2.10.0000.00819.27
8.2.00.0040.00419.49
8.1.280.0170.00725.92
8.1.270.0090.00022.26
8.1.260.0030.00626.35
8.1.250.0030.00628.09
8.1.240.0070.00420.96
8.1.230.0090.00320.97
8.1.220.0040.00418.01
8.1.210.0060.00319.03
8.1.200.0030.00617.73
8.1.190.0040.00817.47
8.1.180.0090.00018.10
8.1.170.0040.00417.62
8.1.160.0000.00919.13
8.1.150.0040.00418.96
8.1.140.0040.00418.99
8.1.130.0000.00720.33
8.1.120.0000.00817.84
8.1.110.0080.00017.79
8.1.100.0040.00417.81
8.1.90.0000.00917.62
8.1.80.0020.00817.78
8.1.70.0000.00717.83
8.1.60.0060.00617.73
8.1.50.0030.00617.64
8.1.40.0030.00917.80
8.1.30.0000.00817.82
8.1.20.0070.00317.87
8.1.10.0080.00017.79
8.1.00.0000.00817.77
8.0.300.0070.00420.28
8.0.290.0040.00417.00
8.0.280.0040.00418.69
8.0.270.0020.00518.31
8.0.260.0030.00318.68
8.0.250.0030.00717.26
8.0.240.0060.00317.27
8.0.230.0040.00417.27
8.0.220.0040.00417.24
8.0.210.0000.00817.08
8.0.200.0070.00017.30
8.0.190.0030.00617.16
8.0.180.0000.01017.27
8.0.170.0030.00617.24
8.0.160.0040.00417.16
8.0.150.0070.00317.19
8.0.140.0040.00417.24
8.0.130.0060.00013.63
8.0.120.0030.00617.23
8.0.110.0040.00416.99
8.0.100.0050.00317.06
8.0.90.0040.00417.16
8.0.80.0110.01117.17
8.0.70.0350.00317.23
8.0.60.0330.01216.96
8.0.50.0250.01217.12
8.0.30.0240.01217.20
8.0.20.0280.01317.27
8.0.10.0320.00917.38
8.0.00.0120.01517.30
7.4.330.0000.00515.55
7.4.320.0080.00016.79
7.4.300.0030.00616.77
7.4.290.0000.00816.70
7.4.280.0050.00316.80
7.4.270.0000.00816.79
7.4.260.0000.00816.84
7.4.250.0080.00016.82
7.4.240.0000.00816.88
7.4.230.0080.00016.67
7.4.220.0120.01216.82
7.4.210.0270.01216.74
7.4.200.0310.00916.82
7.4.190.0240.01316.79
7.4.180.0210.01516.89
7.4.160.0250.01716.83
7.4.150.0230.01116.84
7.4.140.0310.00916.77
7.4.130.0300.02016.80
7.4.120.0280.01716.70
7.4.110.0230.01316.69
7.4.100.0300.01516.72
7.4.90.0340.01416.73
7.4.80.0410.01616.61
7.4.70.0250.01516.55
7.4.60.0340.02116.70
7.4.50.0340.02616.56
7.4.40.0330.01116.65
7.4.30.0280.00916.76
7.4.20.0270.01516.84
7.4.10.0230.01616.71
7.4.00.0260.01216.70
7.3.330.0070.00016.79
7.3.320.0030.00313.55
7.3.310.0000.00716.75
7.3.300.0040.00416.74
7.3.290.0320.00516.64
7.3.280.0240.01216.60
7.3.270.0280.01416.64
7.3.260.0290.01316.57
7.3.250.0360.01016.64
7.3.240.0250.01716.61
7.3.230.0290.01316.56
7.3.220.0290.00516.56
7.3.210.0230.01416.56
7.3.200.0300.00516.54
7.3.190.0230.01716.59
7.3.180.0240.00816.48
7.3.170.0200.01416.53
7.3.160.0230.01716.50
7.3.150.0300.01416.57
7.3.140.0200.02116.57
7.3.130.0240.01416.60
7.3.120.0290.00616.56
7.3.110.0280.01116.54
7.3.100.0260.01316.41
7.3.90.0350.00616.83
7.3.80.0230.01116.45
7.3.70.0280.00716.62
7.3.60.0270.00916.57
7.3.50.0250.01016.66
7.3.40.0220.01216.63
7.3.30.0230.01516.66
7.3.20.0170.01716.68
7.3.10.0310.00716.69
7.3.00.0160.02016.61

preferences:
71.78 ms | 401 KiB | 5 Q