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); ref($array); echo 'time: '.(microtime(true) - $start).' sec'; $start = microtime(true); notref($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.0060.01315.00
7.4.00.0150.00414.89
7.3.130.0120.00314.78
7.3.120.0070.01015.07
7.3.110.0040.00814.61
7.3.100.0130.00314.95
7.3.90.0000.01414.65
7.3.80.0000.01214.70
7.3.70.0030.01414.62
7.3.60.0040.01114.89
7.3.50.0000.01114.77
7.3.40.0070.00714.87
7.3.30.0000.01414.87
7.3.20.0070.00716.87
7.3.10.0070.00816.52
7.3.00.0090.00516.75
7.2.260.0100.01015.22
7.2.250.0100.01015.04
7.2.240.0070.01015.08
7.2.230.0100.00714.78
7.2.220.0100.00314.92
7.2.210.0070.00715.04
7.2.200.0030.00715.16
7.2.190.0090.00315.08
7.2.180.0070.00714.96
7.2.170.0100.00714.79
7.2.160.0060.00914.92
7.2.150.0030.00717.11
7.2.140.0080.00317.02
7.2.130.0040.01116.92
7.2.120.0060.01016.90
7.2.110.0090.00716.88
7.2.100.0060.00917.02
7.2.90.0020.01216.96
7.2.80.0040.01116.79
7.2.70.0100.00617.08
7.2.60.0090.00516.93
7.2.50.0070.00916.91
7.2.40.0020.01116.85
7.2.30.0110.00716.96
7.2.20.0090.00816.89
7.2.10.0070.00916.88
7.2.00.0060.00917.78
7.1.330.0110.00715.69
7.1.320.0030.01415.92
7.1.310.0070.00715.57
7.1.300.0030.00915.92
7.1.290.0030.00915.71
7.1.280.0060.00615.75
7.1.270.0120.00315.77
7.1.260.0040.00815.75
7.1.250.0080.00615.70
7.1.240.0060.00615.78
7.1.230.0120.00315.88
7.1.220.0070.01015.73
7.1.210.0100.00315.78
7.1.200.0000.01415.45
7.1.190.0040.00715.52
7.1.180.0060.00615.98
7.1.170.0030.00515.88
7.1.160.0040.00715.89
7.1.150.0030.01315.88
7.1.140.0060.01015.79
7.1.130.0110.00415.70
7.1.120.0040.01115.62
7.1.110.0030.00915.50
7.1.100.0040.00917.01
7.1.90.0140.00015.90
7.1.80.0000.01215.79
7.1.70.0110.00516.53
7.1.60.0150.01125.34
7.1.50.0160.00925.18
7.1.40.0140.01225.20
7.1.30.0100.01425.12
7.1.20.0180.00925.23
7.1.10.0070.00816.12
7.1.00.0000.01616.31
7.0.330.0060.01015.32
7.0.320.0080.00315.52
7.0.310.0030.01015.40
7.0.300.0000.01115.15
7.0.290.0050.00515.33
7.0.280.0030.01015.34
7.0.270.0030.01015.21
7.0.260.0070.01015.21
7.0.250.0100.00315.17
7.0.240.0070.00715.16
7.0.230.0030.01015.45
7.0.220.0000.01015.42
7.0.210.0100.00615.48
7.0.200.0050.01116.16
7.0.190.0070.00815.87
7.0.180.0080.00615.80
7.0.170.0020.01515.71
7.0.160.0030.01315.90
7.0.150.0080.00715.77
7.0.140.0050.00916.00
7.0.130.0000.01215.87
7.0.120.0100.00915.90
7.0.110.0090.00816.03
7.0.100.0030.01215.88
7.0.90.0060.00815.78
7.0.80.0030.00916.05
7.0.70.0050.01215.67
7.0.60.0110.00515.79
7.0.50.0030.01015.80
7.0.40.0100.00615.01
7.0.30.0050.01214.85
7.0.20.0080.00714.88
7.0.10.0020.00914.94
7.0.00.0030.01014.97
5.6.400.0000.01514.30
5.6.390.0070.00714.61
5.6.380.0120.00314.50
5.6.370.0030.01314.39
5.6.360.0030.01114.63
5.6.350.0000.00914.05
5.6.340.0080.01114.09
5.6.330.0080.01114.54
5.6.320.0070.00714.17
5.6.310.0030.00614.30
5.6.300.0040.01114.14
5.6.290.0100.00314.21
5.6.280.0100.01014.52
5.6.270.0030.01414.14
5.6.260.0000.01114.27
5.6.250.0060.00314.17
5.6.240.0030.01014.29
5.6.230.0140.00314.29
5.6.220.0050.00814.16
5.6.210.0040.00814.34
5.6.200.0080.00414.43
5.6.190.0040.00714.24
5.6.180.0090.00614.48
5.6.170.0040.00814.29
5.6.160.0040.01414.50
5.6.150.0130.00314.29
5.6.140.0000.01314.08
5.6.130.0090.00014.64
5.6.120.0040.01114.27
5.6.110.0070.01014.39
5.6.100.0030.00914.34
5.6.90.0040.00814.26
5.6.80.0040.00814.16
5.6.70.0040.01114.29
5.6.60.0060.00614.13
5.6.50.0060.00914.37
5.6.40.0000.01214.34
5.6.30.0060.01014.21
5.6.20.0000.01314.39
5.6.10.0000.01214.21
5.6.00.0070.00714.20

preferences:
34.65 ms | 400 KiB | 5 Q