3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_exclude(array $arr, array $blacklist){ return array_diff_key($arr, array_flip($blacklist)); } function resource($data) { $name = $data["name"]; $prefix = isset($data["prefix"]) ? $data["prefix"] : ""; $except = isset($data["except"]) ? $data["except"] : []; $methods = $this->array_exclude(['create', 'edit', 'delete'], $except); $result = []; foreach($methods as $method){ array_push($result, "$prefix.$name.$method"); } return $result; } function makePermissions($blueprint){ $result = []; foreach ($blueprint as $item){ switch(gettype($item)){ case "string": array_push($result, $item); break; case "array": $result = array_merge($result, $this->resource($item)); break; } } return $result; } print_f(makePermissions([]));

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.0070.00716.50
8.3.50.0160.00316.28
8.3.40.0090.00618.96
8.3.30.0110.00418.63
8.3.20.0000.00820.30
8.3.10.0040.00421.90
8.3.00.0000.00817.78
8.2.180.0120.00918.14
8.2.170.0100.00722.96
8.2.160.0110.00320.38
8.2.150.0000.00724.18
8.2.140.0050.00324.66
8.2.130.0080.00020.93
8.2.120.0040.00426.35
8.2.110.0050.00520.52
8.2.100.0080.00318.16
8.2.90.0040.00419.07
8.2.80.0060.00317.97
8.2.70.0050.00317.48
8.2.60.0040.00417.80
8.2.50.0080.00018.10
8.2.40.0030.00620.66
8.2.30.0050.00219.27
8.2.20.0000.00817.99
8.2.10.0000.00717.95
8.2.00.0050.00218.01
8.1.280.0140.00025.92
8.1.270.0040.00423.70
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00618.82
8.1.230.0040.00817.42
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0000.01017.23
8.1.190.0040.00417.11
8.1.180.0000.00818.10
8.1.170.0000.00818.58
8.1.160.0000.00718.95
8.1.150.0040.00420.46
8.1.140.0040.00419.46
8.1.130.0000.00818.70
8.1.120.0040.00417.33
8.1.110.0000.00817.39
8.1.100.0070.00017.34
8.1.90.0030.00617.35
8.1.80.0000.01017.28
8.1.70.0000.00717.25
8.1.60.0000.00717.34
8.1.50.0040.00417.50
8.1.40.0070.00017.32
8.1.30.0080.00017.54
8.1.20.0000.00817.61
8.1.10.0030.00617.43
8.1.00.0000.00717.43
8.0.300.0000.00818.77
8.0.290.0060.00316.75
8.0.280.0050.00218.39
8.0.270.0000.00717.13
8.0.260.0030.00316.90
8.0.250.0040.00416.98
8.0.240.0000.00816.98
8.0.230.0030.00617.00
8.0.220.0070.00016.84
8.0.210.0070.00016.77
8.0.200.0040.00416.93
8.0.190.0030.00517.02
8.0.180.0050.00516.86
8.0.170.0040.00416.81
8.0.160.0040.00416.79
8.0.150.0000.00716.88
8.0.140.0050.00316.78
8.0.130.0000.00613.36
8.0.120.0040.00416.77
8.0.110.0050.00216.96
8.0.100.0040.00416.91
8.0.90.0080.00016.81
8.0.80.0070.01116.96
8.0.70.0040.00416.77
8.0.60.0070.00016.89
8.0.50.0000.00816.97
8.0.30.0100.00716.94
8.0.20.0090.01017.40
8.0.10.0000.00717.04
8.0.00.0100.01416.64
7.4.330.0000.00515.55
7.4.320.0080.00016.45
7.4.300.0060.00016.50
7.4.290.0050.00516.38
7.4.280.0030.00516.46
7.4.270.0000.00716.35
7.4.260.0070.00016.48
7.4.250.0030.00516.48
7.4.240.0030.00516.50
7.4.230.0030.00316.63
7.4.220.0200.00716.45
7.4.210.0070.01016.66
7.4.200.0000.00716.36
7.4.160.0100.00616.46
7.4.150.0070.01117.40
7.4.140.0070.01517.86
7.4.130.0030.01416.33
7.4.120.0090.01016.39
7.4.110.0090.00916.61
7.4.100.0100.00716.30
7.4.90.0130.00316.55
7.4.80.0070.01019.39
7.4.70.0060.01016.49
7.4.60.0080.01416.34
7.4.50.0130.00316.68
7.4.40.0130.00316.50
7.4.30.0100.00716.61
7.4.00.0110.00515.15
7.3.330.0030.00313.42
7.3.320.0030.00313.34
7.3.310.0070.00016.29
7.3.300.0030.00316.25
7.3.290.0080.00716.30
7.3.280.0110.00616.29
7.3.270.0090.00917.40
7.3.260.0100.00716.46
7.3.250.0120.00716.41
7.3.240.0080.01216.45
7.3.230.0140.00316.29
7.3.210.0080.00816.47
7.3.200.0100.01016.40
7.3.190.0060.01016.29
7.3.180.0110.00516.50
7.3.170.0130.01016.26
7.3.160.0080.00816.49
7.3.120.0000.01415.07
7.3.110.0110.00614.80
7.3.100.0110.00014.74
7.3.90.0060.00614.70
7.3.80.0000.01415.04
7.3.70.0080.00514.77
7.3.60.0030.00714.88
7.3.50.0040.01114.63
7.3.40.0110.00314.66
7.3.30.0040.01214.91
7.3.20.0060.00616.31
7.3.10.0030.00916.41
7.3.00.0090.00016.67
7.2.330.0110.00716.66
7.2.320.0040.01516.30
7.2.310.0100.01416.63
7.2.300.0060.01316.65
7.2.290.0050.01016.57
7.2.250.0070.01414.52
7.2.240.0090.00915.08
7.2.230.0090.01214.91
7.2.220.0060.00314.94
7.2.210.0030.01314.62
7.2.200.0000.01714.94
7.2.190.0000.01414.97
7.2.180.0130.00014.90
7.2.170.0100.00315.02
7.2.60.0090.00616.85
7.2.00.0030.01319.27
7.1.330.0060.00615.61
7.1.320.0050.00815.75
7.1.310.0050.00815.84
7.1.300.0090.00615.59
7.1.290.0040.00715.66
7.1.280.0030.01015.59
7.1.270.0040.01115.69
7.1.260.0000.01415.40
7.1.200.0000.01215.71
7.1.100.0040.00417.73
7.1.70.1050.01015.03
7.1.60.0290.01033.36
7.1.50.0270.00732.70
7.1.40.0270.00732.39
7.1.30.0200.01332.77
7.1.20.0270.00732.55
7.1.10.0100.01014.84
7.1.00.0110.01114.64
7.0.200.0110.01114.99
7.0.190.0110.00714.76
7.0.180.0150.00614.14
7.0.170.0100.01014.28
7.0.160.0170.00314.37
7.0.150.0130.01014.32
7.0.140.0130.00714.37
7.0.130.0100.01014.80
7.0.120.0100.01014.57
7.0.110.0140.00714.41
7.0.100.0120.00914.36
7.0.90.0070.01414.57
7.0.80.0180.00314.48
7.0.70.0140.00714.54
7.0.60.0120.00914.28
7.0.50.0150.00614.36
7.0.40.0080.01214.54
7.0.30.0100.01014.60
7.0.20.0140.00714.54
7.0.10.0060.01514.47
7.0.00.0170.00714.66

preferences:
53.53 ms | 401 KiB | 5 Q