3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ref(&$array) { foreach ($array as $item) { $item; } } function notref($array) { foreach ($array as $item) { $item; } } $array = range(0, 1000); $start = microtime(true); notref($array); echo 'time: '.(microtime(true) - $start).' sec'; $start = microtime(true); ref($array); echo 'time: '.(microtime(true) - $start).' sec | ';

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.0000.01615.06
7.4.00.0020.01414.94
7.3.130.0060.01214.93
7.3.120.0050.01415.09
7.3.110.0090.00814.81
7.3.100.0090.00514.86
7.3.90.0030.00914.84
7.3.80.0020.01114.86
7.3.70.0020.01314.84
7.3.60.0030.01114.82
7.3.50.0050.00814.52
7.3.40.0080.00614.69
7.3.30.0080.00514.71
7.3.20.0020.01216.61
7.3.10.0050.00816.74
7.3.00.0060.00816.80
7.2.260.0030.01515.27
7.2.250.0070.01115.10
7.2.240.0030.01415.24
7.2.230.0090.00315.07
7.2.220.0080.00815.02
7.2.210.0060.01015.01
7.2.200.0110.00415.21
7.2.190.0070.00714.98
7.2.180.0090.00515.13
7.2.170.0050.01215.14
7.2.160.0030.01214.92
7.2.150.0070.00717.05
7.2.140.0030.01216.82
7.2.130.0040.01216.76
7.2.120.0050.00616.99
7.2.110.0100.00316.84
7.2.100.0060.00816.91
7.2.90.0030.00917.09
7.2.80.0070.00816.87
7.2.70.0090.00717.09
7.2.60.0050.00817.02
7.2.50.0110.00516.93
7.2.40.0030.01316.83
7.2.30.0040.01116.93
7.2.20.0070.00316.78
7.2.10.0040.01116.85
7.2.00.0050.00817.78
7.1.330.0060.00715.78
7.1.320.0070.00715.69
7.1.310.0030.01215.48
7.1.300.0050.01015.72
7.1.290.0080.00515.66
7.1.280.0060.00815.68
7.1.270.0030.01015.52
7.1.260.0030.01215.71
7.1.250.0050.00715.69
7.1.240.0100.00315.42
7.1.230.0080.00415.85
7.1.220.0040.00815.87
7.1.210.0040.01115.78
7.1.200.0030.00715.65
7.1.190.0030.00915.54
7.1.180.0030.01115.40
7.1.170.0030.01415.66
7.1.160.0100.00315.68
7.1.150.0140.00015.99
7.1.140.0040.01115.77
7.1.130.0040.01115.71
7.1.120.0000.01315.63
7.1.110.0090.00616.01
7.1.100.0020.01116.95
7.1.90.0130.00015.71
7.1.80.0000.01315.89
7.1.70.0080.01115.59
7.1.60.0190.00824.49
7.1.50.0210.00824.26
7.1.40.0140.00524.15
7.1.30.0120.00924.11
7.1.20.0130.00824.15
7.1.10.0100.00815.26
7.1.00.0070.00915.37
7.0.330.0090.00615.54
7.0.320.0070.00715.38
7.0.310.0040.00815.59
7.0.300.0100.00615.33
7.0.290.0140.00015.45
7.0.280.0060.01215.44
7.0.270.0030.01215.30
7.0.260.0060.00615.09
7.0.250.0030.00615.59
7.0.240.0000.01615.52
7.0.230.0030.01015.38
7.0.220.0030.01015.36
7.0.210.0000.00915.48
7.0.200.0080.01015.31
7.0.190.0090.00915.16
7.0.180.0040.01314.87
7.0.170.0000.01414.84
7.0.160.0030.01114.96
7.0.150.0070.00614.80
7.0.140.0110.00814.95
7.0.130.0060.00915.07
7.0.120.0540.01015.00
7.0.110.0090.00614.80
7.0.100.0100.00614.89
7.0.90.0050.01114.92
7.0.80.0040.00914.94
7.0.70.0110.00415.05
7.0.60.0070.00714.88
7.0.50.0040.00815.05
7.0.40.0050.01214.08
7.0.30.0100.00714.13
7.0.20.0110.00514.04
7.0.10.0070.00514.05
7.0.00.0030.01114.19
5.6.400.0000.00914.60
5.6.390.0130.00314.34
5.6.380.0110.00714.47
5.6.370.0000.01514.30
5.6.360.0060.00614.45
5.6.350.0040.01414.15
5.6.340.0000.01614.60
5.6.330.0060.00914.33
5.6.320.0120.00014.30
5.6.310.0030.00614.46
5.6.300.0150.00014.30
5.6.290.0000.01114.47
5.6.280.0060.00614.66
5.6.270.0000.01114.09
5.6.260.0090.00614.47
5.6.250.0070.00714.45
5.6.240.0090.00614.65
5.6.230.0090.00614.38
5.6.220.0100.00614.45
5.6.210.0030.01014.41
5.6.200.0100.00714.38
5.6.190.0070.00414.32
5.6.180.0000.01414.50
5.6.170.0090.00614.29
5.6.160.0060.00914.35
5.6.150.0100.00314.29
5.6.140.0110.00014.77
5.6.130.0060.01014.46
5.6.120.0050.00514.30
5.6.110.0090.00314.24
5.6.100.0030.01414.13
5.6.90.0070.01014.29
5.6.80.0070.00714.02
5.6.70.0030.00914.15
5.6.60.0100.00314.09
5.6.50.0070.00614.54
5.6.40.0070.00314.09
5.6.30.0070.00714.51
5.6.20.0100.00314.54
5.6.10.0000.01414.32
5.6.00.0000.01414.37

preferences:
35.41 ms | 401 KiB | 5 Q