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 < 10000; $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.10.0130.02315.77
7.4.00.0070.02516.08
7.3.130.0030.03316.00
7.3.120.0060.01915.88
7.3.110.0070.02715.95
7.3.100.0060.01916.04
7.3.90.0070.02015.79
7.3.80.0130.01616.33
7.3.70.0030.02615.89
7.3.60.0070.02015.63
7.3.50.0030.01916.00
7.3.40.0100.02015.77
7.3.30.0030.02515.87
7.3.20.0080.01516.62
7.3.10.0070.02316.51
7.3.00.0060.01816.44
7.2.260.0130.02615.70
7.2.250.0100.02615.73
7.2.240.0030.02716.23
7.2.230.0070.02616.09
7.2.220.0030.02715.88
7.2.210.0030.02415.84
7.2.200.0000.03116.11
7.2.190.0030.02915.81
7.2.180.0060.02916.08
7.2.170.0030.03015.97
7.2.160.0030.02816.01
7.2.150.0030.02816.60
7.2.140.0090.01916.78
7.2.130.0100.02416.92
7.2.120.0100.02716.53
7.2.110.0070.02416.82
7.2.100.0070.02317.00
7.2.90.0100.02216.78
7.2.80.0000.03716.76
7.2.70.0030.02317.07
7.2.60.0030.03116.82
7.2.50.0070.03116.52
7.2.40.0030.03216.62
7.2.30.0070.02916.77
7.2.20.0000.03716.94
7.2.10.0070.02916.76
7.2.00.0060.02617.98
7.1.330.0030.03215.86
7.1.320.0030.03215.64
7.1.310.0100.02715.81
7.1.300.0030.03215.61
7.1.290.0100.03015.83
7.1.280.0130.02615.73
7.1.270.0070.02315.93
7.1.260.0030.02915.80
7.1.250.0070.02816.06
7.1.240.0030.04215.55
7.1.230.0100.02915.95
7.1.220.0000.03715.73
7.1.210.0030.02715.55
7.1.200.0070.03015.84
7.1.190.0060.03815.82
7.1.180.0000.03615.85
7.1.170.0070.02715.73
7.1.160.0100.03315.69
7.1.150.0070.02815.30
7.1.140.0070.03615.59
7.1.130.0100.03315.59
7.1.120.0070.03715.48
7.1.110.0000.04415.64
7.1.100.0030.04115.83
7.1.90.0030.04115.81
7.1.80.0030.04015.95
7.1.70.0020.02916.39
7.1.60.0050.04417.58
7.1.50.0020.05116.34
7.1.40.0070.03015.87
7.1.30.0030.03015.74
7.1.20.0000.03415.44
7.1.10.0040.03915.72
7.1.00.0050.04319.12
7.0.330.0030.03015.47
7.0.320.0060.02915.29
7.0.310.0030.03015.22
7.0.300.0040.03215.33
7.0.290.0070.02615.11
7.0.280.0030.03015.53
7.0.270.0000.03415.37
7.0.260.0040.03115.51
7.0.250.0060.02615.22
7.0.240.0100.02615.11
7.0.230.0030.03115.48
7.0.220.0060.02815.07
7.0.210.0030.02715.26
7.0.200.0120.02115.61
7.0.190.0070.02715.64
7.0.180.0070.02315.41
7.0.170.0030.02715.56
7.0.160.0130.02015.21
7.0.150.0030.02815.24
7.0.140.0020.05918.72
7.0.130.0070.02715.52
7.0.120.0030.05518.62
7.0.110.0090.02415.28
7.0.100.0140.02115.23
7.0.90.0030.03015.20
7.0.80.0100.04718.18
7.0.70.0050.04618.16
7.0.60.0100.05918.17
7.0.50.0120.04018.36
7.0.40.0080.05716.78
7.0.30.0030.06516.82
7.0.20.0050.05416.57
7.0.10.0180.05116.78
7.0.00.0030.06516.74
5.6.400.1732.32316.50
5.6.390.1362.35916.49
5.6.380.1232.37416.40
5.6.370.1692.32016.70
5.6.360.1702.32415.58
5.6.350.1162.37516.62
5.6.340.1432.35116.70
5.6.330.1262.36716.38
5.6.320.1332.36316.83
5.6.310.1562.33916.70
5.6.300.1202.37716.41
5.6.290.1402.35516.41
5.6.280.1632.33316.23
5.6.270.1662.33016.32
5.6.260.1132.38016.21
5.6.250.1762.31216.49
5.6.240.1592.33516.45
5.6.230.2382.25919.79
5.6.220.1712.32719.71
5.6.210.1952.30020.02
5.6.200.1822.31719.94
5.6.190.1652.29820.07
5.6.180.1952.30220.32
5.6.170.1532.34520.14
5.6.160.1702.32820.23
5.6.150.1432.35520.02
5.6.140.1702.32820.04
5.6.130.1782.32020.11
5.6.120.1882.30620.18
5.6.110.1882.27020.08
5.6.100.1472.35220.09
5.6.90.0622.29019.98
5.6.80.1862.31219.71
5.6.70.1472.35219.59
5.6.60.1732.32519.66
5.6.50.1482.35019.68
5.6.40.1682.33019.87
5.6.30.1682.33019.86
5.6.20.1662.33119.76
5.6.10.1912.30619.87
5.6.00.1772.29319.49
5.5.380.1332.36316.36
5.5.370.1522.33519.43
5.5.360.1522.31319.46
5.5.350.1632.29219.54
5.5.340.1462.31919.66
5.5.330.1512.26719.81
5.5.320.1702.29219.75
5.5.310.1472.29219.79
5.5.300.1482.30219.50
5.5.290.1602.31319.59
5.5.280.1432.32119.61
5.5.270.1332.32219.44
5.5.260.1772.30219.93
5.5.250.1772.30319.74
5.5.240.1202.15019.05
5.5.230.1842.28419.73
5.5.220.1182.09918.94
5.5.210.0882.22119.26
5.5.200.1512.33119.13
5.5.190.1852.28219.59
5.5.180.1572.22819.27
5.5.170.1132.38216.34
5.5.160.1252.18719.22
5.5.150.1071.91819.20
5.5.140.0851.86018.99
5.5.130.1131.99719.22
5.5.120.1582.32019.69
5.5.110.0962.34319.83
5.5.100.1622.32219.44
5.5.90.1201.88619.00
5.5.80.1082.03719.20
5.5.70.1121.98819.07
5.5.60.1632.32819.43
5.5.50.1702.29719.44
5.5.40.1432.13119.17
5.5.30.1382.11219.18
5.5.20.1222.11519.14
5.5.10.1322.17019.20
5.5.00.1552.23719.22
5.4.450.1452.31217.57
5.4.440.1382.31417.05
5.4.430.1452.30217.18
5.4.420.1572.29217.52
5.4.410.1482.15117.14
5.4.400.1172.12716.92
5.4.390.1882.26417.39
5.4.380.0982.10117.01
5.4.370.1542.31916.91
5.4.360.1912.25716.94
5.4.350.1702.30716.84
5.4.340.1652.27617.36
5.4.330.1232.37312.72
5.4.320.0982.12817.04
5.4.310.1612.28017.26
5.4.300.1051.95416.64
5.4.290.0951.99816.75
5.4.280.1422.31817.30
5.4.270.0772.08816.85
5.4.260.0731.75616.56
5.4.250.0801.67216.52
5.4.240.0701.82516.46
5.4.230.1342.10316.91
5.4.220.1782.12717.06
5.4.210.1122.18817.01
5.4.200.1732.31217.46
5.4.190.1582.12816.89
5.4.180.1282.13916.98
5.4.170.1352.19316.80
5.4.160.1592.02616.70
5.4.150.1762.28817.00
5.4.140.0932.31316.14
5.4.130.1282.34715.64
5.4.120.1682.29316.07
5.4.110.1222.12015.79
5.4.100.1162.14315.90
5.4.90.1282.03815.37
5.4.80.1822.26216.05
5.4.70.1352.14715.71
5.4.60.1782.25615.85
5.4.50.1632.12015.63
5.4.40.1802.29916.10
5.4.30.1482.19315.61
5.4.20.1522.32115.66
5.4.10.1982.22215.79
5.4.00.1672.28315.53
5.3.290.1152.05414.59
5.3.280.1082.13214.43
5.3.270.1002.14314.52
5.3.260.0882.21314.56
5.3.250.0882.25614.38
5.3.240.1382.32814.38
5.3.230.1462.30614.63
5.3.220.1502.21714.61
5.3.210.1302.35214.94
5.3.200.0882.17214.27
5.3.190.1172.25514.52
5.3.180.1302.21414.45
5.3.170.1482.32514.97
5.3.160.1052.16014.35
5.3.150.1332.17014.52
5.3.140.1382.09814.49
5.3.130.1032.35214.20
5.3.120.1372.32714.55
5.3.110.1632.32514.51
5.3.100.1552.30214.15
5.3.90.1072.35714.35
5.3.80.1412.33614.65
5.3.70.1252.33913.84
5.3.60.1612.30814.12
5.3.50.1582.31114.14
5.3.40.1262.35114.07
5.3.30.0672.36114.74
5.3.20.1472.31414.08
5.3.10.1602.32614.04
5.3.00.1552.32514.22
5.2.170.2472.21713.06
5.2.160.2472.19713.14
5.2.150.2272.22013.02
5.2.140.2672.18713.07
5.2.130.3032.11713.05
5.2.120.2572.19712.96
5.2.110.2672.13313.00
5.2.100.2802.17013.16
5.2.90.2932.10712.88
5.2.80.2832.18713.00
5.2.70.2472.16712.92
5.2.60.2272.21313.03
5.2.50.1372.34312.66
5.2.40.1672.27312.60
5.2.30.0972.35712.58
5.2.20.1672.24012.58
5.2.10.4232.00312.66
5.2.00.4372.01312.63
5.1.60.0872.37711.80
5.1.50.1032.36311.72
5.1.40.0802.38011.73
5.1.30.1002.31712.03
5.1.20.0872.36712.04
5.1.10.1002.33711.79
5.1.00.0972.34311.86
5.0.50.0772.36310.26
5.0.40.1002.33010.30
5.0.30.0732.36710.00
5.0.20.0702.38010.00
5.0.10.0932.3579.93
5.0.00.0672.38710.01
4.4.90.0572.3837.78
4.4.80.0802.3737.79
4.4.70.0572.4077.78
4.4.60.0472.3477.78
4.4.50.1302.3277.71
4.4.40.0572.3807.78
4.4.30.0832.3237.77
4.4.20.0632.3907.78
4.4.10.0602.3577.79
4.4.00.0802.3907.80
4.3.110.0702.3777.71
4.3.100.0872.3707.64
4.3.90.0872.3507.60
4.3.80.0202.4277.52
4.3.70.0502.4037.62
4.3.60.0432.3677.52
4.3.50.0802.3507.60
4.3.40.0672.3107.53
4.3.30.0802.3506.75
4.3.20.0972.3376.75
4.3.10.0902.3436.75
4.3.00.1072.3106.75

preferences:
38.01 ms | 401 KiB | 5 Q