3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number_to_get = 2; $names = array("Maria", "Jan", "Elton", "Wiktor"); shuffle($names); $picks = array_slice(array_values($names), 0, $number_to_get); var_dump($picks);

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)
7.3.10.0000.01016.57
7.3.00.0070.00716.56
7.2.130.0000.01116.87
7.2.120.0060.00916.79
7.2.110.0040.00816.82
7.2.100.0030.01316.89
7.2.90.0070.00416.73
7.2.80.0070.00716.76
7.2.70.0030.00816.67
7.2.60.0080.00616.94
7.2.50.0100.00316.83
7.2.40.0080.00416.77
7.2.30.0030.00916.50
7.2.20.0040.01116.66
7.2.10.0060.00616.67
7.2.00.0020.00918.05
7.1.250.0090.00015.52
7.1.70.0070.01417.17
7.1.60.0030.01319.40
7.1.50.0100.01316.81
7.1.00.0030.03322.45
7.0.200.0060.00314.54
7.0.140.0130.06322.09
7.0.60.0170.03319.91
7.0.50.0030.08017.84
7.0.40.0030.04719.90
7.0.30.0200.04320.00
7.0.20.0330.06720.16
7.0.10.0030.08720.11
7.0.00.0000.05320.09
5.6.280.0030.07321.11
5.6.210.0130.07720.47
5.6.200.0030.08718.19
5.6.190.0070.08020.47
5.6.180.0230.04720.45
5.6.170.0200.07020.71
5.6.160.0100.04020.41
5.6.150.0030.04018.12
5.6.140.0100.04718.13
5.6.130.0170.06718.17
5.6.120.0070.04021.03
5.6.110.0000.07721.03
5.6.100.0100.08721.00
5.6.90.0030.09320.95
5.6.80.0170.07320.41
5.5.350.0170.07720.40
5.5.340.0100.05018.02
5.5.330.0100.04020.21
5.5.320.0270.08020.28
5.5.310.0200.06020.18
5.5.300.0030.08317.88
5.5.290.0130.06717.96
5.5.280.0100.05320.61
5.5.270.0170.07320.83
5.5.260.0100.08020.86
5.5.250.0030.08720.48
5.5.240.2770.03020.15
5.4.450.0130.06719.14
5.4.440.0100.07719.11
5.4.430.0100.08019.10
5.4.420.0130.05019.46
5.4.410.0100.07018.98
5.4.400.0100.06019.14
5.4.390.0070.05019.18
5.4.380.0000.04019.02
5.4.370.0100.03018.91
5.4.360.0100.03019.07
5.4.350.0030.03719.08
5.4.340.0000.04319.14
5.4.320.0000.05319.16
5.4.310.0030.03719.09
5.4.300.0030.03718.93
5.4.290.0000.04019.07
5.4.280.0030.03719.00
5.4.270.0070.03319.14
5.4.260.0070.03318.91
5.4.250.0000.04018.99
5.4.240.0030.04319.17
5.4.230.0030.04019.22
5.4.220.0000.04019.16
5.4.210.0030.04318.80
5.4.200.0030.04018.78
5.4.190.0100.03018.90
5.4.180.0030.04318.80
5.4.170.0000.04318.80
5.4.160.0070.06718.89
5.4.150.0130.06318.90
5.4.140.0000.07316.20
5.4.130.0130.04016.25
5.4.120.0030.07316.20
5.4.110.0030.03716.15
5.4.100.0030.04016.23
5.4.90.0030.04716.24
5.4.80.0000.05716.18
5.4.70.0000.08016.22
5.4.60.0170.04716.21
5.4.50.0030.05016.58
5.4.40.0030.06316.26
5.4.30.0070.04016.25
5.4.20.0070.04316.21
5.4.10.0070.03716.12
5.4.00.0070.06315.74
5.3.290.0030.03714.60
5.3.280.0030.03714.55
5.3.270.0100.03014.50
5.3.260.0170.03314.54
5.3.250.0030.06714.57
5.3.240.0100.05314.39
5.3.230.0000.04714.55
5.3.220.0030.05014.49
5.3.210.0000.05014.51
5.3.200.0000.04014.35
5.3.190.0030.06314.51
5.3.180.0000.04014.46
5.3.170.0030.08014.54
5.3.160.0100.06014.44
5.3.150.0070.06314.50
5.3.140.0130.06714.49
5.3.130.0070.04314.47
5.3.120.0130.04014.45
5.3.110.0070.04014.48
5.3.100.0000.05313.96
5.3.90.0070.06313.89
5.3.80.0070.06013.82
5.3.70.0000.04013.96
5.3.60.0200.02013.93
5.3.50.0030.06013.73
5.3.40.0070.04313.87
5.3.30.0070.04013.83
5.3.20.0130.06313.62
5.3.10.0100.07013.59
5.3.00.0200.06013.61
5.2.170.0030.06311.09
5.2.160.0030.03311.08
5.2.150.0030.03311.04
5.2.140.0030.04011.22
5.2.130.0030.06710.92
5.2.120.0030.03011.09
5.2.110.0000.04711.03
5.2.100.0030.04011.18
5.2.90.0030.04311.25
5.2.80.0030.04711.03
5.2.70.0030.06711.02
5.2.60.0070.05310.93
5.2.50.0070.05310.90
5.2.40.0100.05710.99
5.2.30.0030.06010.90
5.2.20.0030.04310.86
5.2.10.0030.03011.01
5.2.00.0000.06310.59
5.1.60.0070.0509.98
5.1.50.0000.05010.00
5.1.40.0030.04310.04
5.1.30.0030.04310.38
5.1.20.0000.04010.43
5.1.10.0070.0379.97
5.1.00.0070.05310.06
5.0.50.0000.0238.54
5.0.40.0000.0478.27
5.0.30.0000.0338.28
5.0.20.0000.0438.34
5.0.10.0030.0238.14
5.0.00.0000.0678.13
4.4.90.0030.0137.76
4.4.80.0030.0307.76
4.4.70.0000.0177.76
4.4.60.0000.0377.76
4.4.50.0000.0337.76
4.4.40.0030.0507.76
4.4.30.0000.0377.76
4.4.20.0000.0207.76
4.4.10.0000.0237.76
4.4.00.0000.0277.76
4.3.110.0000.0207.76
4.3.100.0030.0337.76
4.3.90.0030.0137.76
4.3.80.0000.0577.76
4.3.70.0030.0377.76
4.3.60.0030.0307.76
4.3.50.0070.0307.76
4.3.40.0030.0477.76
4.3.30.0000.0307.76
4.3.20.0030.0307.76
4.3.10.0000.0277.76
4.3.00.0000.0207.76

preferences:
35.1 ms | 401 KiB | 5 Q