3v4l.org

run code in 300+ PHP versions simultaneously
<?php function &random_value(&$array, $default=null) { $k = 0; // mt_rand(0, count($array) - 1); if (isset($array[$k])) { return $array[$k]; } else { return $default; } } $companies = array(); $companies[] = array("name" => "Acme Co", "employees"=> array( "John", "Jane" )); $companies[] = array("name" => "Inotech", "employees"=> array( "Bill", "Michael" )); $x = &random_value($companies); $x["employees"][] = "Donald"; var_dump($x, $companies);

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)
8.3.70.0150.00416.50
8.3.60.0100.01016.75
8.3.50.0200.01321.17
8.3.40.0090.00618.93
8.3.30.0120.00318.49
8.3.20.0080.00020.16
8.3.10.0040.00421.74
8.3.00.0060.00319.54
8.2.190.0110.00718.35
8.2.180.0130.00616.63
8.2.170.0090.00622.96
8.2.160.0120.00322.20
8.2.150.0040.00424.18
8.2.140.0120.00324.66
8.2.130.0060.00626.16
8.2.120.0040.00420.56
8.2.110.0080.00022.08
8.2.100.0110.00018.03
8.2.90.0080.00019.22
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0060.00318.04
8.2.50.0030.00518.07
8.2.40.0000.00919.95
8.2.30.0080.00018.00
8.2.20.0030.00617.71
8.2.10.0070.00017.98
8.2.00.0030.00617.95
8.1.280.0140.00725.92
8.1.270.0080.00822.11
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0060.00323.86
8.1.230.0040.00822.75
8.1.220.0000.00817.79
8.1.210.0090.00018.77
8.1.200.0000.00917.23
8.1.190.0050.00317.25
8.1.180.0040.00418.10
8.1.170.0050.00318.29
8.1.160.0040.00418.71
8.1.150.0000.00818.82
8.1.140.0040.00417.46
8.1.130.0000.00717.61
8.1.120.0000.00717.30
8.1.110.0040.00417.39
8.1.100.0040.00417.38
8.1.90.0070.00017.43
8.1.80.0040.00417.30
8.1.70.0080.00017.30
8.1.60.0040.00417.60
8.1.50.0040.00417.56
8.1.40.0000.00817.44
8.1.30.0080.00017.71
8.1.20.0030.00517.57
8.1.10.0080.00017.45
8.1.00.0030.00517.54
8.0.300.0000.00718.77
8.0.290.0060.00316.75
8.0.280.0000.00718.41
8.0.270.0030.00317.20
8.0.260.0030.00317.18
8.0.250.0040.00416.94
8.0.240.0030.00316.91
8.0.230.0030.00316.82
8.0.220.0030.00516.88
8.0.210.0040.00416.84
8.0.200.0040.00416.89
8.0.190.0040.00416.92
8.0.180.0000.00716.88
8.0.170.0060.00316.74
8.0.160.0000.00716.89
8.0.150.0040.00416.70
8.0.140.0070.00016.80
8.0.130.0080.00013.31
8.0.120.0000.00816.72
8.0.110.0050.00316.93
8.0.100.0040.00416.96
8.0.90.0000.00716.73
8.0.80.0100.00616.84
8.0.70.0050.00316.86
8.0.60.0000.00816.96
8.0.50.0040.00416.91
8.0.30.0090.00817.09
8.0.20.0110.00917.40
8.0.10.0040.00416.86
8.0.00.0100.00716.67
7.4.330.0060.00015.08
7.4.320.0060.00016.45
7.4.300.0000.00616.37
7.4.290.0030.00516.59
7.4.280.0040.00416.51
7.4.270.0030.00616.63
7.4.260.0050.00516.49
7.4.250.0000.00716.47
7.4.240.0020.00716.56
7.4.230.0030.00316.41
7.4.220.0100.00716.64
7.4.210.0120.00616.50
7.4.200.0070.00016.60
7.4.160.0110.00616.33
7.4.150.0040.01517.40
7.4.140.0150.00717.86
7.4.130.0080.01116.44
7.4.120.0110.00816.44
7.4.110.0120.00616.45
7.4.100.0150.00916.51
7.4.90.0070.01016.54
7.4.80.0060.01319.39
7.4.70.0060.01016.53
7.4.60.0090.00616.42
7.4.50.0060.00316.37
7.4.40.0070.01416.54
7.4.30.0130.00416.50
7.4.00.0050.01314.96
7.3.330.0000.00713.36
7.3.320.0030.00313.23
7.3.310.0040.00416.39
7.3.300.0030.00316.24
7.3.290.0100.00616.38
7.3.280.0110.00916.39
7.3.270.0110.00817.40
7.3.260.0150.00616.38
7.3.250.0120.00816.35
7.3.240.0120.00616.33
7.3.230.0110.00716.39
7.3.210.0000.01716.44
7.3.200.0070.01416.49
7.3.190.0080.00816.34
7.3.180.0060.01216.41
7.3.170.0120.00616.40
7.3.160.0120.00616.68
7.3.120.0030.01714.55
7.3.110.0070.01115.06
7.3.100.0060.00314.61
7.3.90.0000.01814.74
7.3.80.0060.00614.71
7.3.70.0090.00614.92
7.3.60.0070.01314.95
7.3.50.0100.00715.03
7.3.40.0070.00714.80
7.3.30.0030.00914.96
7.3.20.0070.01016.72
7.3.10.0080.01216.77
7.3.00.0040.01516.60
7.2.330.0100.01016.79
7.2.320.0150.00916.55
7.2.310.0050.01216.70
7.2.300.0190.00016.73
7.2.290.0170.00316.78
7.2.250.0030.01615.12
7.2.240.0200.00014.79
7.2.230.0060.00815.26
7.2.220.0060.01214.89
7.2.210.0060.01015.25
7.2.200.0070.00714.84
7.2.190.0060.01214.82
7.2.180.0070.01014.82
7.2.170.0070.00715.06
7.2.00.0030.00919.44
7.1.330.0030.01015.96
7.1.320.0040.00415.63
7.1.310.0030.00616.02
7.1.300.0100.00715.97
7.1.290.0070.00715.73
7.1.280.0040.00715.99
7.1.270.0070.01015.86
7.1.260.0090.00715.77
7.1.100.0050.00518.12
7.1.70.0100.00616.87
7.1.60.0100.01320.03
7.1.50.0090.01316.71
7.1.00.0070.07322.41
7.0.200.0030.01216.80
7.0.60.0100.06719.96
7.0.50.0100.04717.73
7.0.40.0100.04320.13
7.0.30.0270.04720.16
7.0.20.0330.04320.08
7.0.10.0270.08320.05
7.0.00.0070.04020.16
5.6.280.0070.05320.90
5.6.210.0030.09020.62
5.6.200.0000.04318.19
5.6.190.0100.06320.61
5.6.180.0030.05720.55
5.6.170.0430.07320.47
5.6.160.0000.04720.71
5.6.150.0130.07018.25
5.6.140.0030.08018.11
5.6.130.0100.08018.16
5.6.120.0030.06021.02
5.6.110.0070.08720.98
5.6.100.0070.08021.05
5.6.90.0030.07721.11
5.6.80.0030.03720.38
5.6.70.4230.03720.43
5.5.350.0030.08020.38
5.5.340.0000.04018.05
5.5.330.0130.07720.44
5.5.320.0370.06720.31
5.5.310.0200.08320.34
5.5.300.0070.07717.98
5.5.290.0130.05317.98
5.5.280.0100.06320.87
5.5.270.0030.05020.87
5.5.260.0170.08020.87
5.5.250.0030.04020.66
5.5.240.0070.08020.26
5.4.450.0300.04319.45
5.4.440.0270.05019.46
5.4.430.0270.04319.56
5.4.420.0170.05319.44
5.4.410.0170.05319.49
5.4.400.0200.06019.26
5.4.390.0130.05719.29
5.4.380.0100.06018.84
5.4.370.0370.05719.12
5.4.360.0300.04719.14
5.4.350.0230.04318.87
5.4.340.0330.04018.98
5.4.320.0230.05719.12
5.4.310.0130.05719.36
5.4.300.0200.05018.97
5.4.290.0170.05319.14
5.4.280.0170.05719.23
5.4.270.0100.05719.26
5.4.260.0230.05019.32
5.4.250.0100.05719.21
5.4.240.0100.06319.28
5.4.230.0100.06019.23
5.4.220.0230.06019.13
5.4.210.0230.04719.14
5.4.200.0200.05019.23
5.4.190.0130.05719.13
5.4.180.0130.05718.99
5.4.170.0230.05019.14
5.4.160.0270.04319.24
5.4.150.0230.05719.10
5.4.140.0300.04716.26
5.4.130.0170.04716.50
5.4.120.0230.06016.33
5.4.110.0170.05316.63
5.4.100.0300.04016.60
5.4.90.0200.05016.56
5.4.80.0200.04716.58
5.4.70.0070.05016.57
5.4.60.0030.05316.43
5.4.50.0000.04316.32
5.4.40.0070.07316.34
5.4.30.0170.03316.53
5.4.20.0270.04716.35
5.4.10.0030.07716.18

preferences:
15.74 ms | 401 KiB | 5 Q