3v4l.org

run code in 300+ PHP versions simultaneously
<?php // from 2015 through all of 2018, expect 35,064 elements in the deepest level. $start = 2018; $end = 2018; $years = []; foreach (range($start, $end) as $y) { $months = []; for ($m = 1; $m <= 12; ++$m) { $lastDayOfMonth = date('t', strtotime("$y-$m-01")); $days = []; for ($d = 1; $d <= $lastDayOfMonth; ++$d) { $days[] = range(0, 23); } $months[] = $days; } $years[] = $months; } var_export($years);

Abusive script

This script was stopped while abusing our resources

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.110.0100.00320.94
8.3.100.0080.00024.06
8.3.90.0110.00026.77
8.3.80.0030.00618.55
8.3.70.0030.01318.55
8.3.60.0130.00318.53
8.3.50.0080.01217.21
8.3.40.0100.00322.02
8.3.30.0070.00720.71
8.3.20.0180.00425.66
8.3.10.0100.01025.66
8.3.00.0070.01725.66
8.2.230.0090.00022.58
8.2.220.0080.00037.54
8.2.210.0050.00326.77
8.2.200.0060.00616.88
8.2.190.0090.00618.29
8.2.180.0120.00316.88
8.2.170.0160.00619.37
8.2.160.0110.00322.96
8.2.150.0070.01625.66
8.2.140.0100.01025.66
8.2.130.0100.01025.66
8.2.120.0100.01025.66
8.2.110.0110.00725.66
8.2.100.0170.00425.66
8.2.90.0000.02025.66
8.2.80.0130.00625.66
8.2.70.0070.01425.66
8.2.60.0110.00725.66
8.2.50.0180.00325.66
8.2.40.0120.00625.66
8.2.30.0000.01925.66
8.2.20.0110.00725.66
8.2.10.0160.00325.66
8.2.00.0140.01025.66
8.1.290.0090.00030.84
8.1.280.0110.00425.92
8.1.270.0190.00325.66
8.1.260.0120.00325.66
8.1.250.0000.01625.66
8.1.240.0090.00925.66
8.1.230.0110.01125.66
8.1.220.0120.00925.66
8.1.210.0060.01625.66
8.1.200.0070.01125.66
8.1.190.0120.00325.66
8.1.180.0070.01125.66
8.1.170.0120.00625.66
8.1.160.0090.00625.66
8.1.150.0040.01225.66
8.1.140.0140.00725.66
8.1.130.0100.01025.66
8.1.120.0090.00625.66
8.1.110.0100.00625.66
8.1.100.0060.00925.66
8.1.90.0100.00725.66
8.1.80.0070.01025.66
8.1.70.0110.00925.66
8.1.60.0070.01725.66
8.1.50.0100.01025.66
8.1.40.0060.01225.66
8.1.30.0040.01525.66
8.1.20.0120.00925.66
8.1.10.0160.00025.66
8.1.00.0120.00325.66

preferences:
60.98 ms | 403 KiB | 5 Q