3v4l.org

run code in 300+ PHP versions simultaneously
<?php $memory1 = memory_get_usage(true); print 'before: ' . $memory1 ."\n"; $keys = array(); for ($i = 0; $i<150000; $i++) { $keys[] = 'pref:keyname:' . rand(1000000, 19999999); } asort($keys); $memory2 = memory_get_usage(true); print 'after: ' . $memory2 ."\n"; print 'allocated: ' . ($memory2 - $memory1);

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.0200.20330.54
7.4.00.0130.23130.92
7.3.130.0030.16530.69
7.3.120.0270.21230.83
7.3.110.0260.22130.74
7.3.100.0130.13530.97
7.3.90.0270.21730.48
7.3.80.0180.16230.66
7.3.70.0130.13130.44
7.3.60.0230.16330.79
7.3.50.0260.17430.78
7.3.40.0170.18030.77
7.3.30.0200.14230.45
7.3.20.0160.19434.48
7.3.10.0580.15834.56
7.3.00.0630.13334.65
7.2.260.0170.20930.83
7.2.250.0170.17530.82
7.2.240.0130.20430.55
7.2.230.0130.17531.11
7.2.220.0200.15130.93
7.2.210.0130.13930.81
7.2.200.0170.14630.93
7.2.190.0170.20730.74
7.2.180.0140.14630.68
7.2.170.0170.16330.91
7.2.160.0100.18431.06
7.2.150.0070.20935.04
7.2.140.0070.15134.94
7.2.130.0260.14434.67
7.2.120.0590.13834.89
7.2.110.0340.16834.78
7.2.100.0140.16034.67
7.2.90.1170.16734.93
7.2.80.0570.14434.85
7.2.70.0390.12834.78
7.2.60.0360.15434.93
7.2.50.0360.14834.92
7.2.40.0220.16934.50
7.2.30.0230.14335.03
7.2.20.0370.14734.68
7.2.10.0340.15634.90
7.2.00.0300.13535.69
7.1.330.0070.15433.57
7.1.320.0100.18433.73
7.1.310.0030.15433.95
7.1.300.0130.21933.59
7.1.290.0100.18833.48
7.1.280.0030.17733.60
7.1.270.0070.23833.69
7.1.260.0100.22233.73
7.1.250.0260.16633.67
7.1.240.0000.24433.73
7.1.230.0130.15433.72
7.1.220.0100.20133.95
7.1.210.0100.24733.87
7.1.200.0070.22433.75
7.1.190.0140.19133.49
7.1.180.0070.15833.68
7.1.170.0130.18233.79
7.1.160.0100.15733.43
7.1.150.0190.19033.68
7.1.140.0130.17333.59
7.1.130.0030.16533.73
7.1.120.0070.15233.52
7.1.110.0100.14533.82
7.1.100.0070.18133.74
7.1.90.0100.20433.93
7.1.80.0030.18033.79
7.1.70.0410.13334.35
7.1.60.0500.13834.24
7.1.50.0030.15734.52
7.1.40.0030.15733.77
7.1.30.0030.15833.56
7.1.20.0030.16833.45
7.1.10.0170.15933.75
7.1.00.0080.18337.08
7.0.330.0170.17333.40
7.0.320.0070.15033.47
7.0.310.0000.14933.43
7.0.300.0200.21533.18
7.0.290.0100.14333.61
7.0.280.0100.21933.46
7.0.270.0100.17533.25
7.0.260.0130.14133.48
7.0.250.0230.15033.60
7.0.240.0100.16033.46
7.0.230.0130.16233.52
7.0.220.0070.13933.35
7.0.210.0070.17333.51
7.0.200.0080.17934.01
7.0.190.0030.17833.65
7.0.180.0070.20233.53
7.0.170.0100.16733.58
7.0.160.0030.15033.43
7.0.150.0100.20533.36
7.0.140.0030.19336.78
7.0.130.0200.19133.30
7.0.120.0020.18036.86
7.0.110.0070.16733.55
7.0.100.0030.22833.54
7.0.90.0100.17933.36
7.0.80.0030.20333.62
7.0.70.0130.18433.55
7.0.60.0030.15634.65
7.0.50.0080.15133.63
7.0.40.0070.16225.91
7.0.30.0080.14626.01
7.0.20.0080.16426.05
7.0.10.0080.17425.83
7.0.00.0080.20925.99
5.6.400.0170.40143.25
5.6.390.0230.42742.96
5.6.380.0270.45743.07
5.6.370.0200.40143.15
5.6.360.0270.42142.75
5.6.350.0230.38143.14
5.6.340.0200.39843.22
5.6.330.0200.39142.67
5.6.320.0270.36543.01
5.6.310.0330.42142.96
5.6.300.0200.40043.19
5.6.290.0170.45543.20
5.6.280.0230.37546.27
5.6.270.0230.42142.81
5.6.260.0300.37043.00
5.6.250.0170.42042.94
5.6.240.0230.41843.00
5.6.230.0170.37742.89
5.6.220.0240.44142.93
5.6.210.0150.40945.99
5.6.200.0400.34144.61
5.6.190.0130.34444.81
5.6.180.0100.35944.70
5.6.170.0120.35344.83
5.6.160.0200.34144.65
5.6.150.0150.37744.80
5.6.140.0170.39144.90
5.6.130.0210.34344.72
5.6.120.0170.38944.74
5.6.110.0120.39344.76
5.6.100.0170.39444.75
5.6.90.0130.39144.91
5.6.80.0150.36544.26
5.6.70.0200.35844.50
5.6.60.0030.34244.29
5.6.50.0200.31944.53
5.6.40.0230.39644.33
5.6.30.0240.38644.47
5.6.20.0130.37944.46
5.6.10.0280.38244.53
5.6.00.0240.37244.33
5.5.380.0070.35342.78
5.5.370.0170.38842.86
5.5.360.0270.42043.03
5.5.350.0130.40445.94
5.5.340.0120.36344.55
5.5.330.0070.37144.62
5.5.320.0170.36744.80
5.5.310.0190.35744.57
5.5.300.0230.38244.77
5.5.290.0250.39544.54
5.5.280.0150.39844.72
5.5.270.0150.39444.66
5.5.260.0270.39244.61
5.5.250.0250.35644.47
5.5.240.0180.37644.49
5.5.230.0180.37844.18
5.5.220.0260.35744.19
5.5.210.0170.40544.27
5.5.200.0250.36644.26
5.5.190.0170.38744.37
5.5.180.0170.36944.27
5.5.170.0170.34542.88
5.5.160.0210.36244.40
5.5.150.0120.36844.21
5.5.140.0280.37244.28
5.5.130.0120.34744.40
5.5.120.0200.35844.34
5.5.110.0230.35044.42
5.5.100.0680.32244.39
5.5.90.0230.33044.31
5.5.80.0120.34944.30
5.5.70.0170.36344.37
5.5.60.0260.36044.32
5.5.50.0230.34844.24
5.5.40.0120.31844.11
5.5.30.0190.40344.18
5.5.20.0230.37844.18
5.5.10.0150.35744.28
5.5.00.0300.35744.30
5.4.450.0250.35343.55
5.4.440.0250.39543.65
5.4.430.0100.38143.62
5.4.420.0200.36443.62
5.4.410.0120.39543.49
5.4.400.0130.36843.40
5.4.390.0150.38843.36
5.4.380.0300.36943.29
5.4.370.0580.33143.48
5.4.360.0200.32243.49
5.4.350.0150.38143.50
5.4.340.0210.39843.37
5.4.330.0150.39139.39
5.4.320.0180.37243.39
5.4.310.0130.38043.33
5.4.300.0210.36743.25
5.4.290.0170.35243.64
5.4.280.0220.31443.43
5.4.270.0170.35943.40
5.4.260.0260.33643.49
5.4.250.0150.32043.48
5.4.240.0180.37043.40
5.4.230.0270.38443.35
5.4.220.0170.32543.43
5.4.210.0610.33843.46
5.4.200.0130.36543.26
5.4.190.0230.29543.34
5.4.180.0420.33443.47
5.4.170.0270.33543.47
5.4.160.0260.37943.41
5.4.150.0300.36843.42
5.4.140.0070.36542.06
5.4.130.0180.34842.17
5.4.120.0200.31542.16
5.4.110.0160.41342.11
5.4.100.0150.41042.09
5.4.90.0160.39242.22
5.4.80.0230.39542.11
5.4.70.0200.39242.11
5.4.60.0290.38842.18
5.4.50.0180.38142.14
5.4.40.0240.36942.16
5.4.30.0150.40142.20
5.4.20.0150.36942.03
5.4.10.0170.40142.22
5.4.00.0310.36841.94
5.3.290.0230.34940.45
5.3.280.0170.38140.50
5.3.270.0080.30240.55
5.3.260.0200.32040.44
5.3.250.0170.33340.58
5.3.240.0150.36140.47
5.3.230.0150.33640.49
5.3.220.0170.34640.48
5.3.210.0130.34540.35
5.3.200.0150.37640.27
5.3.190.0170.36140.32
5.3.180.0150.36040.46
5.3.170.0180.39040.57
5.3.160.0170.41640.50
5.3.150.0130.36340.61
5.3.140.0100.40940.55
5.3.130.0120.39040.47
5.3.120.0170.36640.44
5.3.110.0180.38240.51
5.3.100.0150.40940.15
5.3.90.0080.37340.22
5.3.80.0130.38740.12
5.3.70.0120.37940.03
5.3.60.0120.36940.20
5.3.50.0150.41840.02
5.3.40.0180.36940.04
5.3.30.0200.35740.10
5.3.20.0200.32639.89
5.3.10.0180.34339.71
5.3.00.0180.30439.79
5.2.170.0170.31038.06
5.2.160.0100.35338.07
5.2.150.0200.39738.11
5.2.140.0830.31338.02
5.2.130.0030.30037.98
5.2.120.0030.29038.01
5.2.110.0070.39037.92
5.2.100.0070.29337.82
5.2.90.0030.30038.06
5.2.80.0100.41338.04
5.2.70.0130.34338.00
5.2.60.0130.42338.00
5.2.50.0070.30037.74
5.2.40.0070.30737.77
5.2.30.0030.33737.78
5.2.20.0130.28337.73
5.2.10.0170.37337.68
5.2.00.0030.06710.73
5.1.60.0070.0539.97
5.1.50.0000.06010.03
5.1.40.0070.05310.04
5.1.30.0070.05310.36
5.1.20.0100.05310.35
5.1.10.0100.05010.07
5.1.00.0070.0339.98
5.0.50.0030.0508.59
5.0.40.0000.0378.54
5.0.30.0030.0308.26
5.0.20.0000.0238.23
5.0.10.0030.0208.37
5.0.00.0070.0408.18
4.4.90.0000.0138.08
4.4.80.0000.0178.08
4.4.70.0100.0138.08
4.4.60.0000.0338.08
4.4.50.0030.0208.08
4.4.40.0100.0508.08
4.4.30.0030.0308.08
4.4.20.0030.0378.08
4.4.10.0030.0308.08
4.4.00.0030.0538.08
4.3.110.0000.0208.08
4.3.100.0000.0178.08
4.3.90.0070.0108.08
4.3.80.0000.0578.08
4.3.70.0030.0278.08
4.3.60.0070.0308.08
4.3.50.0030.0378.08
4.3.40.0030.0538.08
4.3.30.0030.0338.08
4.3.20.0000.0278.08
4.3.10.0000.0278.08
4.3.00.0000.0278.08

preferences:
38.43 ms | 400 KiB | 5 Q