3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compose(/* funs to compose */) { $fl = func_get_args(); return function($x) use($fl) { $val = $x; while (null !== $f = array_pop($fl)) { $val = $f($val); }; return $val; }; } $up = function($s) {return strtoupper($s);}; $y = function($s) {return $s.'!';}; $reverse = function($a) {return array_reverse($a);}; $head = function($a) {return array_shift(array_values($a));}; $data = ['jumpkick', 'roundhouse', 'uppercut']; $c = compose($y, $up, $head, $reverse); var_dump($c($data));

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.0130.00522.05
8.3.40.0120.00319.04
8.3.30.0040.01118.74
8.3.20.0080.00020.34
8.3.10.0050.00323.48
8.3.00.0080.00019.50
8.2.180.0040.01418.63
8.2.170.0130.00722.96
8.2.160.0090.01222.13
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0090.00017.50
8.2.120.0080.00026.35
8.2.110.0060.00322.26
8.2.100.0090.00517.84
8.2.90.0080.00419.05
8.2.80.0030.01017.97
8.2.70.0060.00317.47
8.2.60.0040.00417.93
8.2.50.0000.01218.07
8.2.40.0000.00918.05
8.2.30.0040.00418.13
8.2.20.0060.00317.73
8.2.10.0080.00018.00
8.2.00.0030.00618.00
8.1.280.0100.00625.92
8.1.270.0060.00322.19
8.1.260.0030.00528.09
8.1.250.0050.00328.09
8.1.240.0090.00023.96
8.1.230.0070.00417.76
8.1.220.0040.00417.80
8.1.210.0080.00018.77
8.1.200.0040.00417.13
8.1.190.0060.00617.11
8.1.180.0000.00918.10
8.1.170.0000.00818.55
8.1.160.0040.00418.97
8.1.150.0070.00018.82
8.1.140.0030.00519.63
8.1.130.0030.00317.61
8.1.120.0030.00517.53
8.1.110.0060.00417.32
8.1.100.0020.00517.29
8.1.90.0000.00717.47
8.1.80.0050.00317.36
8.1.70.0030.00317.34
8.1.60.0000.00917.48
8.1.50.0080.00017.50
8.1.40.0000.00817.46
8.1.30.0030.00517.56
8.1.20.0080.00017.56
8.1.10.0000.00717.48
8.1.00.0060.00317.45
8.0.300.0000.00718.77
8.0.290.0100.00016.58
8.0.280.0000.00718.52
8.0.270.0040.00417.23
8.0.260.0030.00317.23
8.0.250.0080.00016.92
8.0.240.0040.00416.98
8.0.230.0040.00417.02
8.0.220.0000.00716.93
8.0.210.0000.00716.91
8.0.200.0060.00317.02
8.0.190.0000.00716.90
8.0.180.0000.00817.03
8.0.170.0060.00316.92
8.0.160.0030.00316.98
8.0.150.0030.00416.77
8.0.140.0060.00316.89
8.0.130.0030.00313.41
8.0.120.0080.00016.81
8.0.110.0000.00816.96
8.0.100.0020.00516.82
8.0.90.0040.00417.04
8.0.80.0040.01116.96
8.0.70.0050.00216.84
8.0.60.0070.00016.82
8.0.50.0040.00417.03
8.0.30.0130.00617.13
8.0.20.0070.01517.40
8.0.10.0000.00717.04
8.0.00.0100.00816.85
7.4.330.0030.00316.83
7.4.320.0030.00316.64
7.4.300.0030.00316.51
7.4.290.0000.00716.53
7.4.280.0070.00016.51
7.4.270.0030.00316.42
7.4.260.0040.00416.64
7.4.250.0040.00416.56
7.4.240.0000.00716.60
7.4.230.0000.00716.41
7.4.220.0030.01316.50
7.4.210.0140.00316.64
7.4.200.0030.00316.62
7.4.160.0160.00016.64
7.4.150.0170.00017.40
7.4.140.0060.01817.86
7.4.130.0110.00716.54
7.4.120.0130.00716.58
7.4.110.0090.00916.42
7.4.100.0120.00616.56
7.4.90.0120.00916.58
7.4.80.0070.01019.39
7.4.70.0070.01016.57
7.4.60.0120.00616.72
7.4.50.0080.00316.65
7.4.40.0070.01016.56
7.4.30.0040.01416.65
7.4.00.0070.00715.02
7.3.330.0060.00013.30
7.3.320.0020.00213.43
7.3.310.0070.00016.48
7.3.300.0000.00716.45
7.3.290.0040.01516.40
7.3.280.0100.01016.45
7.3.270.0160.00017.40
7.3.260.0110.00716.77
7.3.250.0110.00516.50
7.3.240.0110.00916.47
7.3.230.0070.01416.54
7.3.210.0110.01116.60
7.3.200.0040.01316.52
7.3.190.0060.01016.44
7.3.180.0040.01216.48
7.3.170.0090.00916.49
7.3.160.0100.00616.42
7.3.120.0120.00614.90
7.3.110.0040.01114.84
7.3.100.0120.00415.03
7.3.90.0110.00414.53
7.3.80.0000.01614.80
7.3.70.0030.01014.64
7.3.60.0060.00914.97
7.3.50.0030.00714.73
7.3.40.0030.01414.89
7.3.30.0060.01214.55
7.3.20.0070.01016.66
7.3.10.0070.00816.82
7.3.00.0100.00416.68
7.2.330.0100.00716.81
7.2.320.0130.01016.69
7.2.310.0120.00416.68
7.2.300.0100.00616.75
7.2.290.0030.01716.66
7.2.240.0100.00314.95
7.2.230.0060.00615.21
7.2.220.0000.01615.10
7.2.210.0030.01315.02
7.2.200.0040.01115.23
7.2.190.0060.00614.98
7.2.180.0110.00314.81
7.2.170.0040.01215.17
7.2.160.0080.00814.88
7.2.150.0070.00317.00
7.2.140.0070.00416.95
7.2.130.0030.01216.97
7.2.120.0020.01316.98
7.2.110.0080.00716.90
7.2.100.0080.00916.84
7.2.90.0050.01016.90
7.2.80.0040.00917.00
7.2.70.0050.00816.95
7.2.60.0100.00716.97
7.2.50.0030.01017.01
7.2.40.0040.00716.93
7.2.30.0070.00716.87
7.2.20.0010.01116.91
7.2.10.0080.00417.02
7.2.00.0090.00617.75
7.1.330.0100.00315.77
7.1.320.0100.00315.97
7.1.310.0100.00615.84
7.1.300.0040.01115.80
7.1.290.0110.00715.85
7.1.280.0130.00315.74
7.1.270.0030.01015.79
7.1.260.0030.01315.72
7.1.250.0090.00715.66
7.1.200.0040.01115.80
7.1.100.0070.00718.25
7.1.70.0110.00017.09
7.1.60.0120.00919.48
7.1.50.0050.00516.76
7.1.00.0070.07022.36
7.0.200.0350.00614.71
7.0.60.0070.08319.94
7.0.50.0200.07317.98
7.0.40.0170.07720.26
7.0.30.0330.03720.25
7.0.20.0200.06020.24
7.0.10.0030.09320.07
7.0.00.0030.05020.10
5.6.280.0000.07320.86
5.6.210.0070.04320.54
5.6.200.0000.09018.16
5.6.190.0070.07020.45
5.6.180.0370.07720.64
5.6.170.0230.08020.55
5.6.160.0030.08320.47
5.6.150.0070.03718.14
5.6.140.0030.08018.29
5.6.130.0100.08318.21
5.6.120.0100.08321.07
5.6.110.0100.04321.13
5.6.100.0130.07320.98
5.6.90.0170.07320.99
5.6.80.0100.06320.52
5.5.350.4170.04020.40
5.5.340.0070.07017.96
5.5.330.0000.04720.34
5.5.320.0570.04020.26
5.5.310.0300.07320.38
5.5.300.0100.08318.05
5.5.290.0200.06317.99
5.5.280.0030.06320.82
5.5.270.0070.04020.87
5.5.260.0030.05720.98
5.5.250.0030.08720.68
5.5.240.0230.06720.20

preferences:
44.71 ms | 401 KiB | 5 Q