3v4l.org

run code in 300+ PHP versions simultaneously
<?php $valeurs = range(1, 40); $proba = array_fill(1, 40, 0); for ($i = 0; $i < 10000; ++$i) { $tirage_tab = array_rand($valeurs, 10); foreach($tirage_tab as $key => $value) { $proba[$valeurs[$value]]++; } } asort($proba); echo "Proba : <br/>\n"; foreach($proba as $key => $value) { echo "$key : $value/10000\n"; }

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.0090.01814.95
7.3.120.0130.01714.77
7.3.110.0110.01515.03
7.3.100.0040.02114.80
7.3.90.0000.02014.96
7.3.80.0040.02214.63
7.3.70.0030.02014.84
7.3.60.0000.02514.81
7.3.50.0070.01514.99
7.3.40.0160.00914.55
7.3.30.0060.01914.64
7.3.20.0090.01216.71
7.3.10.0100.01716.72
7.3.00.0090.01916.56
7.2.250.0100.02014.81
7.2.240.0090.01915.28
7.2.230.0070.01815.01
7.2.220.0030.01414.95
7.2.210.0070.01715.15
7.2.200.0100.01314.97
7.2.190.0070.01715.04
7.2.180.0000.02214.93
7.2.170.0060.01915.19
7.2.130.0160.02516.71
7.2.120.0080.02916.22
7.2.110.0200.02016.43
7.2.100.0150.01816.34
7.2.90.0140.02716.88
7.2.80.0170.01816.47
7.2.70.0140.01416.61
7.2.60.0110.01416.33
7.2.50.0110.02117.04
7.2.40.0060.01416.90
7.2.30.0100.01616.64
7.2.20.0060.01916.95
7.2.10.0110.02216.34
7.2.00.0050.01717.98
7.1.330.0040.02815.84
7.1.320.0120.01815.86
7.1.310.0030.02215.88
7.1.300.0030.02615.87
7.1.290.0040.02215.87
7.1.280.0030.02815.73
7.1.270.0030.02715.87
7.1.260.0030.02415.89
7.1.250.0180.03015.42
7.1.70.0030.01417.19
7.1.60.0100.01319.19
7.1.50.0040.03916.96
7.1.00.0070.08722.40
7.0.200.0160.01314.86
7.0.60.0300.08019.87
7.0.50.0030.05017.68
7.0.40.0070.09720.32
7.0.30.0230.06020.16
7.0.20.0230.06720.17
7.0.10.0000.06320.27
7.0.00.0030.05019.99
5.6.280.0000.10321.00
5.6.210.0130.10020.66
5.6.200.0030.08318.16
5.6.190.0130.10320.49
5.6.180.0230.06720.57
5.6.170.0270.08020.45
5.6.160.0030.09020.38
5.6.150.0030.06018.21
5.6.140.0000.06018.09
5.6.130.0100.05318.05
5.6.120.0200.05720.88
5.6.110.0100.06720.88
5.6.100.0200.10020.98
5.6.90.0030.06321.10
5.6.80.0130.09320.37
5.5.350.4270.06020.42
5.5.340.0100.10017.98
5.5.330.0100.06020.06
5.5.320.0330.11020.30
5.5.310.0230.10720.24
5.5.300.0000.08318.02
5.5.290.0000.07717.91
5.5.280.0070.09720.73
5.5.270.0030.11020.68
5.5.260.0170.10720.64
5.5.250.0070.10720.68
5.5.240.0230.10320.26

preferences:
30.58 ms | 401 KiB | 5 Q