3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pivot = []; $n = 0; for ($i = 1; $i <= 100; $i++) { $pivot[$i] = []; } for($i = 1; $i <= 100; $n++) { $user = &$pivot[rand($i, 100)]; $rand = rand(0, 100); $random = $rand != $user ? $rand : $rand + 1; $user[] = $random; if($n == 10) { $i++; $n = 0; } } print_r($pivot);

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.2.00.0060.00619.57
7.1.100.0180.00918.00
7.1.70.0000.00717.15
7.1.60.0140.01119.46
7.1.50.0030.01617.13
7.1.00.0030.07722.51
7.0.200.0160.00316.86
7.0.140.0230.08022.09
7.0.60.0130.07719.95
7.0.50.0170.06018.02
7.0.40.0200.08020.04
7.0.30.0270.04020.20
7.0.20.0400.04020.12
7.0.10.0370.08320.25
7.0.00.0130.09320.12
5.6.280.0200.07720.85
5.6.210.0200.08320.64
5.6.200.0100.08718.25
5.6.190.0130.07320.41
5.6.180.0330.06320.63
5.6.170.0370.03720.48
5.6.160.0070.05020.40
5.6.150.0170.04718.16
5.6.140.0200.06718.17
5.6.130.0230.08018.17
5.6.120.0100.05321.03
5.6.110.0130.06721.03
5.6.100.0300.08021.04
5.6.90.0270.06721.19
5.6.80.0070.05720.44
5.6.70.0230.08320.31
5.5.350.0130.08720.40
5.5.340.0200.07718.04
5.5.330.0130.07320.43
5.5.320.0370.04320.35
5.5.310.0400.08020.26
5.5.300.0170.08017.97
5.5.290.0100.09317.95
5.5.280.0230.05720.77
5.5.270.0100.05720.76
5.5.260.0130.08020.79
5.5.250.0130.06320.49
5.5.240.0330.07320.30
5.4.450.0430.04719.31
5.4.440.4570.04019.48
5.4.430.0200.04319.56
5.4.420.0530.04319.47
5.4.410.0230.04319.37
5.4.400.0600.06719.22
5.4.390.3970.05019.25
5.4.380.0470.06018.99
5.4.370.0330.05019.13
5.4.360.0400.03719.13
5.4.350.0430.03319.35
5.4.340.0430.05719.06
5.4.320.0270.04718.84
5.4.310.0370.04719.13
5.4.300.0330.08319.08
5.4.290.0100.04018.99
5.4.280.0570.06018.99
5.4.270.0270.04719.09
5.4.260.0370.06019.31
5.4.250.0470.07018.98
5.4.240.0300.07719.19
5.4.230.0270.03718.97
5.4.220.0570.06718.97
5.4.210.0430.06719.30
5.4.200.0300.03319.08
5.4.190.0330.06319.23
5.4.180.0400.06319.21
5.4.170.3730.04319.14
5.4.160.0330.04319.04
5.4.150.3330.04719.19
5.4.140.3700.04016.34
5.4.130.0300.04316.30
5.4.120.0130.05316.43
5.4.110.0230.05716.61
5.4.100.0130.04016.33
5.4.90.0230.05016.33
5.4.80.0170.04016.23
5.4.70.0130.06716.59
5.4.60.0170.05016.56
5.4.50.0170.07316.58
5.4.40.0230.06316.55
5.4.30.0300.05016.57
5.4.20.0300.05016.47
5.4.10.3900.03316.47
5.4.00.4330.04016.16

preferences:
35.91 ms | 401 KiB | 5 Q