3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('TEST_VALUE_COUNT', 5000); srand(15); $values = array(); for ($i = 0; $i < TEST_VALUE_COUNT; $i++) { $values[] = rand(); } srand(15); foreach($values as $key => $value) { if ($value !== rand()) { print "Bad value at " . $key; exit; } } echo "All were the same in " . count($values) . " values"; srand(15); shuffle($values); $valuesShuffled = array_merge(array(), $values); srand(15); shuffle($values); var_dump($valuesShuffled); var_dump($values); if (count(array_diff_assoc($values, $valuesShuffled)) == 0) { echo "Array was the same after a seeded shuffle"; } else { echo "Array was not the same after a seeded shuffle\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.3.10.0100.01016.35
7.3.00.0190.00516.73
7.2.130.0150.00316.95
7.2.120.0150.00716.53
7.2.110.0150.00317.04
7.2.100.0030.02416.95
7.2.90.0210.00316.87
7.2.80.0140.01116.96
7.2.70.0160.01017.06
7.2.60.0170.00816.86
7.2.50.0140.01016.95
7.2.40.0090.01216.77
7.2.30.0140.01016.94
7.2.20.0110.01516.75
7.2.10.0040.01817.07
7.2.00.0130.00417.89
7.1.250.0030.01615.77
7.1.70.0090.00616.98
7.1.60.0070.00717.25
7.1.50.0110.01417.13
7.1.00.0170.07322.38
7.0.200.0780.00015.27
7.0.140.0100.07022.18
7.0.100.0130.07020.32
7.0.90.0270.05020.30
7.0.80.0230.08020.32
7.0.70.0270.05720.32
7.0.60.0100.05720.32
7.0.50.0330.07020.60
7.0.40.0030.08319.95
7.0.30.0170.07320.19
7.0.20.0030.08720.10
7.0.10.0030.05019.94
7.0.00.0070.08320.09
5.6.280.0100.07722.35
5.6.250.0100.07322.07
5.6.240.0130.08021.93
5.6.230.0130.04021.91
5.6.220.0070.05721.91
5.6.210.0070.08322.02
5.6.200.0070.09022.32
5.6.190.0100.08722.43
5.6.180.0130.08322.19
5.6.170.0170.06322.19
5.6.160.0070.06022.21
5.6.150.0000.05722.18
5.6.140.0130.09022.42
5.6.130.0100.06722.20
5.6.120.0170.07322.35
5.6.110.0270.07722.27
5.6.100.0100.09022.25
5.6.90.0200.08722.28
5.6.80.0130.07321.61
5.6.70.0070.09021.71
5.6.60.0170.07721.67
5.6.50.0170.08021.72
5.6.40.0130.08021.72
5.6.30.0070.06721.57
5.6.20.0130.08021.62
5.6.10.0100.06021.68
5.6.00.0130.07721.62
5.5.380.0230.07721.81
5.5.370.0130.05721.65
5.5.360.0170.07321.66
5.5.350.0070.05021.68
5.5.340.0200.04022.02
5.5.330.0100.08021.89
5.5.320.0170.08722.02
5.5.310.0130.05022.16
5.5.300.0070.09022.05
5.5.290.0030.05722.15
5.5.280.0100.07022.15
5.5.270.0100.09322.09
5.5.260.0130.08322.09
5.5.250.0130.06721.86
5.5.240.0100.08321.27
5.5.230.0200.06321.45
5.5.220.0100.08321.38
5.5.210.0130.08321.23
5.5.200.0130.07321.33
5.5.190.0200.08021.40
5.5.180.0170.05021.43
5.5.160.0100.07721.40
5.5.150.0170.08021.43
5.5.140.0070.05321.37
5.5.130.0100.07721.35
5.5.120.0100.06321.46
5.5.110.0100.05721.42
5.5.100.0300.06721.43
5.5.90.0100.08321.32
5.5.80.0130.06021.32
5.5.70.0130.07021.32
5.5.60.0170.07721.30
5.5.50.0030.08721.74
5.5.40.0030.04721.90
5.5.30.0000.08021.83
5.5.20.0230.07721.82
5.5.10.0100.08021.71
5.5.00.0030.04721.75
5.4.450.0030.08020.83
5.4.440.0170.05320.96
5.4.430.0130.09020.94
5.4.420.0170.08021.14
5.4.410.0130.06320.84
5.4.400.0070.05020.63
5.4.390.0230.06320.64
5.4.380.0130.07320.45
5.4.370.0130.07320.73
5.4.360.0100.08720.80
5.4.350.0130.08020.57
5.4.340.0170.07720.73
5.4.320.0130.04720.70
5.4.310.0100.06320.63
5.4.300.0130.05020.60
5.4.290.0100.08720.71
5.4.280.0270.03320.82
5.4.270.0230.04020.50
5.4.260.0100.03720.72
5.4.250.0130.07020.63
5.4.240.0100.07320.67
5.4.230.0130.07720.63
5.4.220.0100.06320.71
5.4.210.0130.04320.79
5.4.200.0200.04020.46
5.4.190.0070.08020.63
5.4.180.0130.07020.49
5.4.170.0170.05720.66
5.4.160.0100.04020.70
5.4.150.0100.06020.70
5.4.140.0130.07318.00
5.4.130.0100.03717.76
5.4.120.0100.07317.98
5.4.110.0100.06717.94
5.4.100.0100.05717.88
5.4.90.0030.03718.08
5.4.80.0070.07017.95
5.4.70.0170.07717.92
5.4.60.0100.06318.09
5.4.50.0100.05717.96
5.4.40.0070.07718.12
5.4.30.0100.06017.89
5.4.20.0130.06717.95
5.4.10.0070.08018.08
5.4.00.0100.07017.51
5.3.290.0100.07715.97
5.3.280.0070.08715.90
5.3.270.0300.03316.13
5.3.260.0070.06316.03
5.3.250.0070.07316.10
5.3.240.0070.05016.13
5.3.230.0070.06016.09
5.3.220.0100.05315.93
5.3.210.0170.06315.99
5.3.200.0130.07716.09
5.3.190.0100.06715.99
5.3.180.0070.07316.08
5.3.170.0070.07716.02
5.3.160.0200.06716.06
5.3.150.0130.07316.01
5.3.140.0230.05015.94
5.3.130.0070.04316.07
5.3.120.0100.07715.97
5.3.110.0100.04716.00
5.3.100.0000.04715.56
5.3.90.0130.07315.46
5.3.80.0170.07015.33
5.3.70.0130.06715.42
5.3.60.0070.05715.28
5.3.50.0170.03015.23
5.3.40.0200.06715.26
5.3.30.0130.06715.17
5.3.20.0100.06715.10
5.3.10.0030.04315.08
5.3.00.0130.07714.64
5.2.170.0130.02312.52
5.2.160.0070.03312.47
5.2.150.0100.07012.33
5.2.140.0070.04312.59
5.2.130.0070.04312.41
5.2.120.0100.03012.42
5.2.110.0070.07712.50
5.2.100.0170.04712.40
5.2.90.0130.03312.47
5.2.80.0070.06012.48
5.2.70.0170.07312.42
5.2.60.0070.06712.45
5.2.50.0070.04012.43
5.2.40.0070.07312.36
5.2.30.0070.06312.27
5.2.20.0100.06012.41
5.2.10.0030.05312.23
5.2.00.0070.06012.32
5.1.60.0100.05711.84
5.1.50.0100.04711.98
5.1.40.0100.04711.82
5.1.30.0070.05712.17
5.1.20.0030.04012.26
5.1.10.0070.06011.84
5.1.00.0170.05711.81
5.0.50.0100.04310.84
5.0.40.0070.03710.84
5.0.30.0100.07310.84
5.0.20.0130.04710.84
5.0.10.0100.04710.84
5.0.00.0030.06710.84
4.4.90.0130.04010.84
4.4.80.0100.02010.84
4.4.70.0100.04010.84
4.4.60.0000.02710.84
4.4.50.0070.04310.84
4.4.40.0030.07710.84
4.4.30.0070.03010.84
4.4.20.0070.03010.84
4.4.10.0100.04710.84
4.4.00.0030.04710.84
4.3.110.0070.04310.84
4.3.100.0200.04010.84
4.3.90.0130.02310.84
4.3.80.0130.05310.84
4.3.70.0130.03310.84
4.3.60.0170.04010.84
4.3.50.0030.05310.84
4.3.40.0100.06010.84
4.3.30.0130.04010.84
4.3.20.0070.04310.84
4.3.10.0000.05010.84
4.3.00.0070.04310.84

preferences:
38.55 ms | 400 KiB | 5 Q