3v4l.org

run code in 300+ PHP versions simultaneously
<?php ###MISSION IS BELOW IN COMMENT #the groupByOwners function should return ["Randy" => ["Input.txt", "Output.txt"], "Stan" => ["Code.py"]]. class FileOwners { public static function groupByOwners($files) { $result = array(); foreach($files as $name => $owner){ $result[$owner][] = $name; } return $result; } } $files = array ( "Input.txt" => "Randy", "Code.py" => "Stan", "Output.txt" => "Randy" ); var_dump(FileOwners::groupByOwners($files));

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.0170.00316.63
8.3.50.0120.00916.71
8.3.40.0080.00618.50
8.3.30.0160.00318.63
8.3.20.0040.00420.22
8.3.10.0000.00823.71
8.3.00.0040.00423.46
8.2.180.0180.00016.50
8.2.170.0110.00422.96
8.2.160.0000.01420.26
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0070.00021.05
8.2.110.0070.00321.03
8.2.100.0040.00717.91
8.2.90.0000.00818.16
8.2.80.0060.00317.97
8.2.70.0080.00017.93
8.2.60.0060.00318.05
8.2.50.0040.00418.22
8.2.40.0030.00620.42
8.2.30.0080.00019.25
8.2.20.0040.00418.10
8.2.10.0040.00418.18
8.2.00.0040.00418.16
8.1.280.0100.01025.92
8.1.270.0070.00722.19
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.01020.61
8.1.230.0090.00320.85
8.1.220.0040.00417.79
8.1.210.0040.00418.87
8.1.200.0060.00317.23
8.1.190.0000.00817.10
8.1.180.0000.00818.10
8.1.170.0060.00318.51
8.1.160.0040.00418.80
8.1.150.0040.00420.14
8.1.140.0000.00719.63
8.1.130.0040.00417.50
8.1.120.0040.00417.48
8.1.110.0050.00317.46
8.1.100.0080.00017.48
8.1.90.0040.00417.36
8.1.80.0040.00417.52
8.1.70.0040.00417.35
8.1.60.0000.00817.61
8.1.50.0030.00617.52
8.1.40.0060.00317.52
8.1.30.0000.00817.65
8.1.20.0040.00417.51
8.1.10.0040.00417.49
8.1.00.0000.00817.43
8.0.300.0000.00719.91
8.0.290.0100.00016.75
8.0.280.0000.00718.36
8.0.270.0070.00017.30
8.0.260.0030.00316.82
8.0.250.0030.00317.00
8.0.240.0030.00616.86
8.0.230.0000.00716.80
8.0.220.0000.00716.89
8.0.210.0030.00316.96
8.0.200.0000.00616.96
8.0.190.0000.00716.86
8.0.180.0040.00416.92
8.0.170.0040.00416.83
8.0.160.0000.00716.94
8.0.150.0040.00416.89
8.0.140.0040.00416.77
8.0.130.0000.00613.30
8.0.120.0000.00816.82
8.0.110.0070.00016.90
8.0.100.0040.00416.96
8.0.90.0000.00716.94
8.0.80.0090.00616.94
8.0.70.0080.00016.89
8.0.60.0000.00816.87
8.0.50.0040.00416.96
8.0.30.0120.00617.08
8.0.20.0090.01117.40
8.0.10.0000.00716.99
8.0.00.0120.00616.92
7.4.330.0050.00016.71
7.4.320.0030.00316.59
7.4.300.0060.00016.48
7.4.290.0030.00516.51
7.4.280.0000.00816.60
7.4.270.0000.00716.58
7.4.260.0030.00316.48
7.4.250.0030.00516.39
7.4.240.0000.00716.48
7.4.230.0000.00716.70
7.4.220.0160.00716.50
7.4.210.0110.00416.50
7.4.200.0070.00016.35
7.4.160.0080.01516.52
7.4.150.0090.00917.40
7.4.140.0100.00917.86
7.4.130.0090.01416.64
7.4.120.0110.00916.42
7.4.110.0080.00816.58
7.4.100.0060.00916.32
7.4.90.0090.01016.50
7.4.80.0130.00619.39
7.4.70.0130.01016.64
7.4.60.0080.00816.45
7.4.50.0030.01316.42
7.4.40.0120.00616.41
7.4.30.0080.00816.73
7.4.00.0090.00615.01
7.3.330.0050.00013.39
7.3.320.0000.00513.36
7.3.310.0000.00616.39
7.3.300.0030.00316.37
7.3.290.0000.00716.38
7.3.280.0080.00916.34
7.3.270.0090.00917.40
7.3.260.0110.00616.46
7.3.250.0080.01016.48
7.3.240.0110.00716.49
7.3.230.0040.01316.55
7.3.210.0040.01316.68
7.3.200.0080.00816.48
7.3.190.0090.00616.60
7.3.180.0090.00616.33
7.3.170.0040.01416.32
7.3.160.0060.01816.34
7.2.330.0070.01016.60
7.2.320.0100.00716.66
7.2.310.0090.01216.76
7.2.300.0080.00816.43
7.2.290.0130.00316.72
7.2.60.0070.00316.84
7.1.200.0000.00715.77
7.1.110.0100.00617.86
7.1.100.0000.01318.28
7.1.90.0070.00718.05
7.1.80.0040.00918.13
7.1.70.0100.00317.22
7.1.60.0150.01535.09
7.1.50.0170.01034.66
7.1.40.0190.01934.27
7.1.30.0130.01634.63
7.1.20.0140.01434.63
7.1.10.0070.00716.64
7.1.00.0070.00716.71
7.0.250.0120.00317.54
7.0.240.0090.00317.55
7.0.230.0100.00317.82
7.0.220.0090.00617.54
7.0.210.0060.00916.67
7.0.200.0110.00316.75
7.0.190.0030.01016.47
7.0.180.0000.01216.18
7.0.170.0030.01016.17
7.0.160.0100.00316.19
7.0.150.0000.01816.28
7.0.140.0060.00816.36
7.0.130.0000.01316.43
7.0.120.0060.00616.56
7.0.110.0000.01316.38
7.0.100.0030.01016.27
7.0.90.0080.00516.33
7.0.80.0070.01116.28
7.0.70.0030.01016.37
7.0.60.0100.00316.17
7.0.50.0030.01216.39
7.0.40.0000.01816.52
7.0.30.0090.00916.35
7.0.20.0000.01316.32
7.0.10.0040.01116.32
7.0.00.0120.00816.49

preferences:
32.52 ms | 400 KiB | 5 Q