3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Placeholder{} function curry(callable $func, ... $curriedArgs) { return function(...$fulfillment) use ($func, $curriedArgs) { return $func(...array_merge(array_map(function($arg) use ($fulfillment) { if ($arg instanceof Placeholder) return array_shift($fulfillment); return $arg; }, $curriedArgs), $fulfillment)); }; }; $resultset = json_decode('[{ "id": 1, "gender": "Male", "name": "Matthew" }, { "id": 2, "gender": "Male", "name": "Willie" }, { "id": 3, "gender": "Female", "name": "Ann" }, { "id": 4, "gender": "Female", "name": "Margaret" }, { "id": 5, "gender": "Female", "name": "Marie" }]',TRUE); $filterGender = function($row,$gender){ return $row['gender']==$gender; }; $detectMen = curry($filterGender,(new Placeholder),'Male'); $detectWomen = curry($filterGender,(new Placeholder),'Female'); var_dump($detectMen(['gender'=>'Male'])); //works $getLadies = curry('array_filter',(new Placeholder),$detectWomen); var_dump($getLadies($resultset)); //does not work

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.130.0040.00718.52
8.3.120.0000.00820.59
8.3.110.0040.00420.94
8.3.100.0100.00316.93
8.3.90.0100.00326.77
8.3.80.0090.00019.36
8.3.70.0150.00016.58
8.3.60.0070.00716.63
8.3.50.0110.00821.09
8.3.40.0150.00018.70
8.3.30.0070.00719.13
8.3.20.0040.00420.34
8.3.10.0050.00321.86
8.3.00.0000.00919.02
8.2.250.0070.00318.66
8.2.240.0040.01218.75
8.2.230.0120.00322.58
8.2.220.0090.00037.54
8.2.210.0040.00426.77
8.2.200.0030.00618.88
8.2.190.0040.01116.67
8.2.180.0070.01418.54
8.2.170.0110.00419.21
8.2.160.0200.00022.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00721.07
8.2.110.0030.00721.00
8.2.100.0080.00319.39
8.2.90.0060.00317.75
8.2.80.0050.00317.97
8.2.70.0080.00017.93
8.2.60.0000.00917.63
8.2.50.0050.00317.75
8.2.40.0030.00520.04
8.2.30.0000.00718.30
8.2.20.0040.00417.94
8.2.10.0070.00018.04
8.2.00.0000.00718.21
8.1.300.0090.00016.37
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0060.00322.18
8.1.230.0060.00620.92
8.1.220.0050.00517.77
8.1.210.0000.00818.84
8.1.200.0060.00317.35
8.1.190.0030.00617.35
8.1.180.0040.00418.10
8.1.170.0040.00418.56
8.1.160.0040.00422.12
8.1.150.0080.00018.97
8.1.140.0040.00417.46
8.1.130.0000.00717.52
8.1.120.0000.00717.50
8.1.110.0070.00017.43
8.1.100.0000.00817.46
8.1.90.0040.00417.42
8.1.80.0040.00317.40
8.1.70.0040.00417.48
8.1.60.0000.00817.60
8.1.50.0040.00417.57
8.1.40.0060.00317.56
8.1.30.0060.00317.55
8.1.20.0000.00817.59
8.1.10.0080.00017.51
8.1.00.0080.00017.58
8.0.300.0000.00720.21
8.0.290.0070.00016.88
8.0.280.0070.00018.56
8.0.270.0070.00316.93
8.0.260.0030.00316.91
8.0.250.0070.00017.09
8.0.240.0040.00416.96
8.0.230.0000.00717.08
8.0.220.0000.00716.91
8.0.210.0000.00716.87
8.0.200.0000.00717.07
8.0.190.0030.00517.11
8.0.180.0040.00416.93
8.0.170.0040.00416.91
8.0.160.0000.00717.14
8.0.150.0030.00317.00
8.0.140.0100.00016.86
8.0.130.0030.00313.38
8.0.120.0050.00316.96
8.0.110.0060.00316.91
8.0.100.0040.00416.83
8.0.90.0050.00216.87
8.0.80.0070.01016.97
8.0.70.0040.00417.02
8.0.60.0060.00316.80
8.0.50.0070.00016.81
8.0.30.0120.00517.16
8.0.20.0110.00817.40
8.0.10.0000.00717.07
8.0.00.0110.00916.80
7.4.330.0000.00515.07
7.4.320.0000.00716.55
7.4.300.0060.00016.64
7.4.290.0030.00516.52
7.4.280.0000.00716.61
7.4.270.0000.00716.63
7.4.260.0040.00416.70
7.4.250.0040.00416.61
7.4.240.0040.00416.62
7.4.230.0000.00716.71
7.4.220.0100.00616.57
7.4.210.0080.00816.57
7.4.200.0000.00716.51
7.4.160.0030.01316.54
7.4.150.0120.00917.40
7.4.140.0150.01017.86
7.4.130.0080.01016.46
7.4.120.0060.01216.61
7.4.110.0070.01716.74
7.4.100.0070.01416.61
7.4.90.0070.01116.63
7.4.80.0060.01219.39
7.4.70.0110.00616.36
7.4.60.0080.01216.54
7.4.50.0050.00016.39
7.4.40.0220.00016.75
7.4.30.0030.01416.54
7.4.00.0040.01114.92
7.3.330.0060.00013.27
7.3.320.0030.00313.50
7.3.310.0070.00016.42
7.3.300.0000.00716.42
7.3.290.0070.00816.42
7.3.280.0070.00916.42
7.3.270.0100.00717.40
7.3.260.0060.01016.71
7.3.250.0080.01116.54
7.3.240.0110.00516.57
7.3.230.0150.00616.42
7.3.210.0090.00616.39
7.3.200.0030.01419.39
7.3.190.0160.00016.55
7.3.180.0070.01516.48
7.3.170.0100.00616.42
7.3.160.0180.00616.46
7.2.330.0120.00916.61
7.2.320.0140.00616.64
7.2.310.0100.00716.44
7.2.300.0070.01016.63
7.2.290.0000.01716.70
7.2.60.0120.00316.69
7.1.200.0060.00615.94
7.1.70.0040.00417.19
7.1.60.0070.01719.48
7.1.50.0160.01016.78
7.1.00.0030.07722.30
7.0.200.0110.00416.89
7.0.60.0100.07320.00
7.0.50.0130.08017.87
7.0.40.0100.09020.21
7.0.30.0300.05020.19
7.0.20.0230.07320.05
7.0.10.0230.08720.09
7.0.00.0070.05720.20
5.6.280.0000.07721.12
5.6.210.0200.06320.48
5.6.200.0070.06718.22
5.6.190.0030.04320.50
5.6.180.3730.04320.64
5.6.170.0170.04320.48
5.6.160.0100.08320.46
5.6.150.0070.03718.14
5.6.140.0100.06318.19
5.6.130.0070.05318.22
5.6.120.0070.08721.01
5.6.110.0270.07721.02
5.6.100.0070.05721.15
5.6.90.0070.08721.04
5.6.80.0200.06320.39
5.6.70.3900.04020.37
5.5.350.0300.07020.43
5.5.340.0000.07017.98
5.5.330.0070.04320.41
5.5.320.0330.08020.35
5.5.310.0330.05720.24
5.5.300.0030.06318.02
5.5.290.0130.08018.04
5.5.280.0130.07020.90
5.5.270.0130.08020.86
5.5.260.0070.08320.73
5.5.250.0100.08020.69
5.5.240.0130.06320.37
5.4.450.0900.04019.32
5.4.440.0700.06319.21
5.4.430.0270.04319.41
5.4.420.0100.07719.36
5.4.410.0130.05019.27
5.4.400.0170.05019.02
5.4.390.0100.05319.09
5.4.380.0030.06319.06
5.4.370.0200.04319.14
5.4.360.0100.05019.06
5.4.350.0030.06319.21
5.4.340.0030.06018.97
5.4.320.0200.04319.14
5.4.310.0070.06019.01
5.4.300.0170.05019.10
5.4.290.0230.04719.23
5.4.280.0200.04319.11
5.4.270.0130.05019.00
5.4.260.0070.05719.11
5.4.250.0100.05719.11
5.4.240.0070.06019.10
5.4.230.0130.05019.23
5.4.220.0100.05718.99
5.4.210.0130.05018.99
5.4.200.0230.06016.61
5.4.190.0100.05319.13
5.4.180.0130.04719.21
5.4.170.0070.05718.99
5.4.160.0170.04319.05
5.4.150.0070.05719.08
5.4.140.0030.06016.38
5.4.130.0100.05016.48
5.4.120.0130.04716.28
5.4.110.0070.05016.61
5.4.100.0130.05716.56
5.4.90.0170.04716.66
5.4.80.0070.06016.43
5.4.70.0070.05716.59
5.4.60.0100.05016.34
5.4.50.0100.05016.54
5.4.40.0070.06716.60
5.4.30.0130.04716.42
5.4.20.0070.05316.61
5.4.10.0130.04316.36
5.4.00.0000.06016.11
5.3.290.0030.07014.58
5.3.280.0200.05014.59
5.3.270.0100.05714.77
5.3.260.0070.05714.65
5.3.250.0130.04714.71
5.3.240.0100.05014.75
5.3.230.0070.06014.49
5.3.220.0100.05014.56
5.3.210.0130.05014.55
5.3.200.0100.05314.46
5.3.190.0030.06014.71
5.3.180.0130.04714.71
5.3.170.0100.05014.67
5.3.160.0070.05314.67
5.3.150.0170.05014.51
5.3.140.0200.04014.61
5.3.130.0200.06314.55
5.3.120.0130.07314.45
5.3.110.0130.06314.58
5.3.100.0130.04713.95
5.3.90.0130.04714.07
5.3.80.0130.06013.92
5.3.70.0170.05714.00
5.3.60.0030.05713.98
5.3.50.0130.04713.96
5.3.40.0130.06713.93
5.3.30.0200.06013.91
5.3.20.0130.05713.83
5.3.10.0070.06313.71
5.3.00.0200.05013.53
5.2.170.0100.04711.05
5.2.160.0100.05311.04
5.2.150.0070.05711.09
5.2.140.0100.04011.13
5.2.130.0100.03711.04
5.2.120.0130.04011.09
5.2.110.0170.04311.08
5.2.100.0030.04310.94
5.2.90.0130.03711.07
5.2.80.0100.05010.98
5.2.70.0030.05010.99
5.2.60.0170.05010.96
5.2.50.0100.05711.13
5.2.40.0100.05010.84
5.2.30.0100.04011.13
5.2.20.0000.05310.95
5.2.10.0100.03710.81
5.2.00.0070.04010.65
5.1.60.0070.0339.99
5.1.50.0100.03010.04
5.1.40.0070.03310.07
5.1.30.0070.04710.50
5.1.20.0100.03310.25
5.1.10.0070.0439.95
5.1.00.0200.02310.00
5.0.50.0030.0308.45
5.0.40.0070.0278.32
5.0.30.0000.0638.26
5.0.20.0030.0308.07
5.0.10.0070.0278.08
5.0.00.0100.0378.30
4.4.90.0030.0235.75
4.4.80.0000.0275.90
4.4.70.0000.0275.75
4.4.60.0070.0205.84
4.4.50.0030.0275.77
4.4.40.0070.0405.88
4.4.30.0030.0235.74
4.4.20.0030.0235.96
4.4.10.0030.0235.99
4.4.00.0100.0405.78
4.3.110.0100.0175.83
4.3.100.0030.0205.71
4.3.90.0030.0235.66
4.3.80.0100.0275.66
4.3.70.0070.0175.68
4.3.60.0030.0205.75
4.3.50.0000.0275.66
4.3.40.0030.0335.75
4.3.30.0070.0174.45
4.3.20.0070.0204.48
4.3.10.0000.0234.46
4.3.00.0030.01715.39

preferences:
28.74 ms | 403 KiB | 5 Q