3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [1,2,3,4]; $rnd = array_rand($arr, 3); //What you are doing echo $arr[1] . " - " . $arr[2] . " - " . $arr[3]; echo "\n"; //What you want to do echo $arr[$rnd[0]] . " - " . $arr[$rnd[1]] . " - " . $arr[$rnd[2]];

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.4.00.0030.01315.01
7.3.120.0120.00614.47
7.3.110.0120.00614.79
7.3.100.0120.00614.71
7.3.90.0000.01314.56
7.3.80.0060.01214.93
7.3.70.0030.00714.85
7.3.60.0040.01114.80
7.3.50.0030.00614.62
7.3.40.0070.00714.46
7.3.30.0030.01314.76
7.3.20.0070.00416.63
7.3.10.0030.01016.51
7.3.00.0040.00916.62
7.2.250.0070.01015.07
7.2.240.0070.01315.04
7.2.230.0000.01715.32
7.2.220.0070.00814.83
7.2.210.0090.00915.07
7.2.200.0030.01014.73
7.2.190.0100.00314.85
7.2.180.0030.00615.17
7.2.170.0060.00915.19
7.2.160.0040.01415.27
7.2.150.0120.00316.89
7.2.140.0030.01016.89
7.2.130.0050.01016.94
7.2.120.0030.01116.88
7.2.110.0060.00416.90
7.2.100.0080.00316.85
7.2.90.0040.01216.75
7.2.80.0040.01016.71
7.2.70.0070.00617.03
7.2.60.0050.01016.90
7.2.50.0030.01417.01
7.2.40.0080.00617.08
7.2.30.0050.00816.91
7.2.20.0060.00916.69
7.2.10.0070.00716.76
7.2.00.0050.01117.76
7.1.330.0000.01815.84
7.1.320.0030.01015.63
7.1.310.0060.00615.88
7.1.300.0100.00015.83
7.1.290.0060.00615.84
7.1.280.0080.00415.60
7.1.270.0040.00415.72
7.1.260.0000.00815.73
7.1.250.0080.00315.80
7.1.240.0030.01015.63
7.1.230.0090.00615.89
7.1.220.0040.01115.74
7.1.210.0000.01215.89
7.1.200.0040.01115.72
7.1.190.0030.00615.85
7.1.180.0000.00915.95
7.1.170.0030.01015.63
7.1.160.0070.00715.87
7.1.150.0030.00915.84
7.1.140.0000.00915.85
7.1.130.0070.01015.90
7.1.120.0070.00415.80
7.1.110.0070.00715.91
7.1.100.0070.01015.87
7.1.90.0090.00615.90
7.1.80.0060.00615.82
7.1.70.0020.01016.55
7.1.60.0050.01017.49
7.1.50.0050.01216.40
7.1.40.0070.01015.93
7.1.30.0030.01015.97
7.1.20.0070.00715.77
7.1.10.0000.01215.75
7.1.00.0030.04319.02
7.0.330.0150.00015.58
7.0.320.0150.00015.15
7.0.310.0070.00715.43
7.0.300.0000.01315.38
7.0.290.0000.01315.41
7.0.280.0030.00915.45
7.0.270.0030.01415.25
7.0.260.0060.00615.38
7.0.250.0030.01015.08
7.0.240.0070.00715.60
7.0.230.0000.01015.08
7.0.220.0110.00415.19
7.0.210.0030.01015.43
7.0.200.0160.00416.06
7.0.190.0060.00915.07
7.0.180.0070.00415.42
7.0.170.0060.01015.49
7.0.160.0030.00915.35
7.0.150.0110.00415.52
7.0.140.0070.00715.54
7.0.130.0030.01515.29
7.0.120.0000.01515.22
7.0.110.0030.00515.40
7.0.100.0100.00315.09
7.0.90.0000.01215.50
7.0.80.0070.00715.46
7.0.70.0040.00815.21
7.0.60.0170.03917.64
7.0.50.0240.03217.88
7.0.40.0070.04816.78
7.0.30.0130.03316.80
7.0.20.0100.03816.89
7.0.10.0080.03616.91
7.0.00.0070.03716.85
5.6.400.0100.00314.38
5.6.390.0000.01214.19
5.6.380.0060.00614.28
5.6.370.0060.00614.50
5.6.360.0070.01014.64
5.6.350.0100.00314.29
5.6.340.0090.00614.46
5.6.330.0070.00714.34
5.6.320.0040.01214.34
5.6.310.0030.00714.31
5.6.300.0090.00414.21
5.6.290.0060.00314.71
5.6.280.0030.04217.64
5.6.270.0060.00314.55
5.6.260.0100.00314.30
5.6.250.0000.01114.23
5.6.240.0040.00814.50
5.6.230.0030.00914.14
5.6.220.0040.01114.68
5.6.210.0060.03817.44
5.6.200.0150.03617.80
5.6.190.0210.03317.72
5.6.180.0100.03817.80
5.6.170.0180.03517.58
5.6.160.0080.03317.74
5.6.150.0090.03917.64
5.6.140.0110.03017.58
5.6.130.0280.02817.77
5.6.120.0070.03817.78
5.6.110.0090.03517.57
5.6.100.0150.03617.86
5.6.90.0220.02817.85
5.6.80.0270.03017.34
5.6.70.0180.03417.27
5.6.60.0230.03017.38
5.6.50.0210.03817.34
5.6.40.0220.03517.37
5.6.30.0170.03817.31
5.6.20.0130.03417.36
5.6.10.0080.03717.38
5.6.00.0130.04317.29
5.5.380.0040.00714.23
5.5.370.0070.00714.21
5.5.360.0000.01414.05
5.5.350.0130.04617.42
5.5.340.0250.03017.60
5.5.330.0120.04517.47
5.5.320.0050.03917.64
5.5.310.0070.03517.67
5.5.300.0050.04417.68
5.5.290.0170.03517.63
5.5.280.0130.02817.45
5.5.270.0100.03517.49
5.5.260.0180.03217.61
5.5.250.0110.03917.37
5.5.240.0200.03417.16
5.5.230.0290.02517.32
5.5.220.0280.02817.13
5.5.210.0250.03117.20
5.5.200.0240.03417.20
5.5.190.0230.04817.28
5.5.180.0160.03717.18
5.5.170.0050.01114.29
5.5.160.0230.03017.28
5.5.150.0230.02817.31
5.5.140.0200.02917.16
5.5.130.0250.03517.26
5.5.120.0160.03317.29
5.5.110.0220.03517.32
5.5.100.0170.04017.36
5.5.90.0260.03317.24
5.5.80.0170.03517.18
5.5.70.0080.03317.29
5.5.60.0090.03517.16
5.5.50.0160.03617.23
5.5.40.0170.03017.12
5.5.30.0190.03017.10
5.5.20.0170.04017.08
5.5.10.0220.03017.11
5.5.00.0230.03117.00

preferences:
38.3 ms | 403 KiB | 5 Q