3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getRandomStr($length){ return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length); } function put(&$mixed, $key, $value) { if (is_array($mixed)) { $mixed[$key] = $value; } else { // Do something else which we don't care about here } } $start = microtime(true); $mixed = array(); for($i = 0; $i < 1000; $i++) { put($mixed, getRandomStr(15), 'abcd'); } print round(microtime(true) - $start, 2) . 's';

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.01215.14
7.3.120.0030.01214.88
7.3.110.0110.01115.07
7.3.100.0060.00915.07
7.3.90.0110.00614.87
7.3.80.0030.01015.24
7.3.70.0070.01015.04
7.3.60.0070.00714.93
7.3.50.0070.01015.08
7.3.40.0000.01114.99
7.3.30.0100.00315.01
7.3.20.0000.01316.75
7.3.10.0030.01116.48
7.3.00.0050.00916.42
7.2.250.0090.01215.14
7.2.240.0130.01015.05
7.2.230.0100.00315.29
7.2.220.0030.01315.03
7.2.210.0100.00715.23
7.2.200.0030.01015.07
7.2.190.0120.00314.96
7.2.180.0030.01614.95
7.2.170.0000.01815.20
7.2.130.0070.01016.78
7.2.120.0050.00816.89
7.2.110.0030.01216.64
7.2.100.0050.00916.61
7.2.90.0030.01316.85
7.2.80.0040.01116.85
7.2.70.0090.00616.88
7.2.60.0060.00816.58
7.2.50.0090.00616.50
7.2.40.0040.00916.92
7.2.30.0070.01016.64
7.2.20.0050.01016.66
7.2.10.0050.01016.64
7.2.00.0040.01017.63
7.1.330.0030.01215.62
7.1.320.0100.01015.89
7.1.310.0110.00715.62
7.1.300.0060.01215.82
7.1.290.0040.01116.01
7.1.280.0000.01315.83
7.1.270.0030.01215.71
7.1.260.0070.00715.80
7.1.250.0020.01015.69
7.1.70.0040.01117.29
7.1.60.0070.01819.40
7.1.50.0030.01616.90
7.1.00.0070.04022.27
7.0.200.0060.00316.89
7.0.140.0000.10022.10
7.0.70.0070.04020.09
7.0.60.0070.04020.03
7.0.50.0100.04020.41
7.0.40.0130.08020.13
7.0.30.0170.07720.10
7.0.20.0030.08320.08
7.0.10.0130.07320.13
7.0.00.0100.08020.04
5.6.280.0000.10721.09
5.6.220.0070.05320.75
5.6.210.0070.05320.91
5.6.200.0030.07321.30
5.6.190.0230.10321.21
5.6.180.0100.07721.21
5.6.170.0030.11721.26
5.6.160.0070.11721.26
5.6.150.0130.09721.20
5.6.140.0070.11321.29
5.6.130.0100.10021.18
5.6.120.0170.10321.41
5.6.110.0100.10721.20
5.6.100.0100.09321.26
5.6.90.0070.11021.24
5.6.80.0070.11020.63
5.6.70.0100.10720.72
5.6.60.0030.07320.63
5.6.50.0030.11320.56
5.6.40.0100.11020.73
5.6.30.0100.08020.62
5.6.20.0230.09320.61
5.6.10.0370.08720.66
5.6.00.0100.10020.50
5.5.360.0070.05720.63
5.5.350.0070.05720.71
5.5.340.0200.10021.17
5.5.330.0130.10721.13
5.5.320.0030.11321.15
5.5.310.0070.12020.95
5.5.300.0100.10321.11
5.5.290.0070.11321.07
5.5.280.0170.10721.13
5.5.270.0100.11321.03
5.5.260.0230.09721.05
5.5.250.0130.10320.78
5.5.240.0070.08720.41
5.5.230.0100.11320.51
5.5.220.0130.09720.41
5.5.210.0000.10020.49
5.5.200.0130.10720.44
5.5.190.0030.10020.51
5.5.180.0130.09020.38
5.5.160.0100.10320.39
5.5.150.0100.10720.38
5.5.140.0170.10720.42
5.5.130.0030.10720.50
5.5.120.0100.10720.35
5.5.110.0000.07020.36
5.5.100.0000.06720.31
5.5.90.0130.10020.34
5.5.80.0200.09320.18
5.5.70.0100.10020.30
5.5.60.0030.11320.38
5.5.50.0000.11320.30
5.5.40.0100.10720.34
5.5.30.0030.07020.20
5.5.20.0070.10320.29
5.5.10.0200.06020.21
5.5.00.0030.10320.30
5.4.450.0070.12019.38
5.4.440.0030.13019.55
5.4.430.0070.10319.54
5.4.420.0070.10319.51
5.4.410.0130.10719.27
5.4.400.0100.10719.25
5.4.390.0170.09319.25
5.4.380.0130.09719.38
5.4.370.0100.09019.07
5.4.360.0030.10719.21
5.4.350.0070.10019.43
5.4.340.0070.09719.30
5.4.320.0000.11719.21
5.4.310.0070.08319.25
5.4.300.0070.10319.21
5.4.290.0030.11319.24
5.4.280.0130.10019.18
5.4.270.0230.09719.37
5.4.260.0000.08719.21
5.4.250.0030.10719.24
5.4.240.0100.10719.29
5.4.230.0230.09719.21
5.4.220.0130.10719.29
5.4.210.0130.08719.21
5.4.200.0070.10019.14
5.4.190.0130.10019.20
5.4.180.0070.08019.29
5.4.170.0100.09319.28
5.4.160.0070.07019.19
5.4.150.0070.09319.27
5.4.140.0130.10716.47
5.4.130.0000.09716.47
5.4.120.0100.09716.57
5.4.110.0100.09316.56
5.4.100.0170.09716.54
5.4.90.0130.10016.68
5.4.80.0130.10016.50
5.4.70.0100.09316.61
5.4.60.0030.06016.60
5.4.50.0030.08716.50
5.4.40.0030.09716.65
5.4.30.0170.10016.63
5.4.20.0130.09716.63
5.4.10.0070.08716.58
5.4.00.0070.08315.98
5.3.290.0030.07714.96
5.3.280.0030.06314.99
5.3.270.0030.09715.00
5.3.260.0070.11014.98
5.3.250.0070.08315.03
5.3.240.0270.09314.92
5.3.230.0170.07014.90
5.3.220.0030.07714.84
5.3.210.0100.10014.85
5.3.200.0130.07714.91
5.3.190.0070.07314.98
5.3.180.0070.11714.98
5.3.170.0070.11014.85
5.3.160.0100.05014.99
5.3.150.0100.09014.90
5.3.140.0100.09714.93
5.3.130.0030.07014.96
5.3.120.0130.10314.88
5.3.110.0100.07714.97
5.3.100.0200.07014.43
5.3.90.0030.11314.44
5.3.80.0100.07714.30
5.3.70.0130.10714.41
5.3.60.0170.06714.24
5.3.50.0130.09314.19
5.3.40.0130.10014.17
5.3.30.0070.11014.31
5.3.20.0070.09013.92
5.3.10.0030.05713.89
5.3.00.0000.06713.85
5.2.170.0070.09011.67
5.2.160.0000.06311.52
5.2.150.0030.06011.66
5.2.140.0100.07311.66
5.2.130.0070.08311.50
5.2.120.0070.08311.47
5.2.110.0070.10011.57
5.2.100.0030.04711.43
5.2.90.0000.06011.44
5.2.80.0100.08311.59
5.2.70.0070.06011.59
5.2.60.0000.05311.52
5.2.50.0030.08711.31
5.2.40.0070.08011.46
5.2.30.0070.05011.28
5.2.20.0030.05311.50
5.2.10.0030.09311.36
5.2.00.0030.09711.10
5.1.60.0100.10710.61
5.1.50.0070.07310.61
5.1.40.0070.12310.61
5.1.30.0070.12310.77
5.1.20.0000.12010.80
5.1.10.0070.13010.61
5.1.00.0000.14310.61
5.0.50.0000.09310.61
5.0.40.0030.10010.61
5.0.30.0000.13310.61
5.0.20.0100.12310.61
5.0.10.0030.10010.61
5.0.00.0070.12710.61
4.4.90.0070.05710.61
4.4.80.0000.09010.61
4.4.70.0130.07710.61
4.4.60.0000.13310.61
4.4.50.0000.10010.61
4.4.40.0030.08010.61
4.4.30.0030.09010.61
4.4.20.0100.06010.61
4.4.10.0070.12310.61
4.4.00.0000.09710.61
4.3.110.0000.06710.61
4.3.100.0000.13010.61
4.3.90.0070.12010.61
4.3.80.0100.11710.61
4.3.70.0070.09310.61
4.3.60.0030.11710.61
4.3.50.0030.11010.61
4.3.40.0200.13010.61
4.3.30.0030.11010.61
4.3.20.0030.12010.61
4.3.10.0030.10310.61
4.3.00.0030.11010.61

preferences:
34.57 ms | 401 KiB | 5 Q