3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 50; $start = microtime(true); $y = 0; for($i = 0; $i < $count; $i++) { eval('++$y;'); } printf("#1, result is %d, done in %f\n", $y, microtime(true) - $start); $start = microtime(true); $y = 0; for($i = 0; $i < $count; $i++) { $f = function() use (&$y) { return ++$y; }; $f(); } printf("#2, result is %d, done in %f\n", $y, microtime(true) - $start);

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.0070.01014.98
7.4.00.0130.00614.84
7.3.130.0060.01314.93
7.3.120.0120.00314.73
7.3.110.0150.00314.99
7.3.100.0130.00314.49
7.3.90.0070.00714.75
7.3.80.0090.00614.78
7.3.70.0110.00414.73
7.3.60.0040.00814.94
7.3.50.0090.00614.90
7.3.40.0090.00614.59
7.3.30.0070.00714.87
7.3.20.0070.00716.77
7.3.10.0050.01116.47
7.3.00.0100.00716.53
7.2.260.0080.00415.18
7.2.250.0070.01115.20
7.2.240.0070.01014.96
7.2.230.0130.00315.27
7.2.220.0090.00914.93
7.2.210.0060.01015.01
7.2.200.0090.00914.82
7.2.190.0080.00415.00
7.2.180.0030.01015.11
7.2.170.0120.00015.16
7.2.160.0090.00614.73
7.2.150.0070.00716.90
7.2.140.0090.00616.72
7.2.130.0060.01016.79
7.2.120.0070.00916.93
7.2.110.0090.00816.82
7.2.100.0060.01116.58
7.2.90.0120.00316.93
7.2.80.0110.00816.79
7.2.70.0070.00816.83
7.2.60.0080.00716.83
7.2.50.0060.00816.75
7.2.40.0050.00916.66
7.2.30.0080.00816.68
7.2.20.0050.00916.94
7.2.10.0070.00716.81
7.2.00.0100.00717.53
7.1.330.0080.00815.87
7.1.320.0070.00715.85
7.1.310.0030.01015.56
7.1.300.0040.00415.93
7.1.290.0080.00315.79
7.1.280.0000.01715.80
7.1.270.0040.01115.82
7.1.260.0080.00415.75
7.1.250.0070.01115.61
7.1.240.0000.01415.83
7.1.230.0060.00915.86
7.1.220.0000.01315.54
7.1.210.0060.00315.93
7.1.200.0060.00915.80
7.1.190.0070.01015.66
7.1.180.0090.00015.53
7.1.170.0040.00715.63
7.1.160.0070.01115.97
7.1.150.0070.01115.76
7.1.140.0030.00615.84
7.1.130.0090.00615.94
7.1.120.0000.01315.76
7.1.110.0090.00915.79
7.1.100.0040.01115.97
7.1.90.0040.01115.84
7.1.80.0060.00915.79
7.1.70.0070.00716.57
7.1.60.0070.00617.85
7.1.50.0050.01216.44
7.1.40.0080.00615.79
7.1.30.0120.00315.98
7.1.20.0070.01015.98
7.1.10.0030.00615.50
7.1.00.0040.03419.01
7.0.330.0030.01415.42
7.0.320.0070.01115.45
7.0.310.0070.00715.18
7.0.300.0040.00915.45
7.0.290.0030.01015.42
7.0.280.0040.01115.40
7.0.270.0080.00615.52
7.0.260.0070.01015.32
7.0.250.0070.00715.34
7.0.240.0060.00615.16
7.0.230.0000.00815.61
7.0.220.0060.00315.55
7.0.210.0000.01415.21
7.0.200.0060.00716.15
7.0.190.0000.00915.27
7.0.180.0030.01315.43
7.0.170.0060.00615.43
7.0.160.0060.01015.42
7.0.150.0060.01015.23
7.0.140.0040.04218.69
7.0.130.0040.01115.05
7.0.120.0100.00315.47
7.0.110.0110.00315.58
7.0.100.0110.00415.56
7.0.90.0050.00515.59
7.0.80.0040.01115.49
7.0.70.0070.00715.35
7.0.60.0090.04717.67
7.0.50.0000.02816.71
7.0.40.0080.04616.79
7.0.30.0080.03016.94
7.0.20.0170.04716.89
7.0.10.0080.02816.86
7.0.00.0070.04716.89
5.6.400.0030.01014.55
5.6.390.0030.01013.97
5.6.380.0100.00614.41
5.6.370.0090.00314.58
5.6.360.0090.00614.29
5.6.350.0000.01714.05
5.6.340.0040.01214.59
5.6.330.0030.01214.67
5.6.320.0040.01114.34
5.6.310.0040.01114.35
5.6.300.0030.00914.35
5.6.290.0040.01414.26
5.6.280.0030.04017.92
5.6.270.0060.01014.41
5.6.260.0040.00814.45
5.6.250.0040.01114.50
5.6.240.0030.00714.17
5.6.230.0000.01814.41
5.6.220.0070.00714.30
5.6.210.0030.03217.44
5.6.200.0050.04516.26
5.6.190.0050.04717.35
5.6.180.1680.02117.44
5.6.170.0100.02517.36
5.6.160.0020.02817.43
5.6.150.0070.05016.26
5.6.140.0070.02716.21
5.6.130.0070.03516.24
5.6.120.0030.05017.68
5.6.110.0050.03017.69
5.6.100.0080.04317.69
5.6.90.0130.02517.58
5.6.80.0050.04317.36
5.6.70.0070.04717.24
5.6.60.0070.00714.26
5.6.50.0080.00814.25
5.6.40.0100.01314.16
5.6.30.0150.00613.92
5.6.20.0030.01414.28
5.6.10.0030.01014.08
5.6.00.0040.01414.20
5.5.380.0120.00614.41
5.5.370.0080.00814.05
5.5.360.0030.01014.21
5.5.350.0080.04817.32
5.5.340.0070.04316.15
5.5.330.0070.03517.28
5.5.320.0100.03317.32
5.5.310.0160.04517.11
5.5.300.0070.04216.11
5.5.290.0030.02516.17
5.5.280.0070.02517.64
5.5.270.0000.02717.78
5.5.260.0070.04217.70
5.5.250.0170.03017.42
5.5.240.0070.03917.30
5.5.230.0070.01014.25
5.5.220.0030.00814.34
5.5.210.0060.00914.34
5.5.200.0090.00314.40
5.5.190.0040.00814.20
5.5.180.0100.00714.23
5.5.170.0000.01614.30
5.5.160.0030.01114.36
5.5.150.0030.00714.20
5.5.140.0060.00314.05
5.5.130.0060.01014.43
5.5.120.0060.00914.21
5.5.110.0080.00314.16
5.5.100.0060.00314.27
5.5.90.0070.01014.13
5.5.80.0040.00814.17
5.5.70.0030.01014.09
5.5.60.0000.00913.98
5.5.50.0070.00714.16
5.5.40.0000.01714.29
5.5.30.0100.00314.14
5.5.20.0040.00914.21
5.5.10.0030.01013.77
5.5.00.0000.01114.21
5.4.450.0420.04015.34
5.4.440.0410.03215.39
5.4.430.0320.03715.20
5.4.420.0070.03315.42
5.4.410.0340.03415.33
5.4.400.0520.03414.95
5.4.390.0650.03414.92
5.4.380.0200.02614.81
5.4.370.0140.02415.02
5.4.360.0100.02914.79
5.4.350.0050.02011.56
5.4.340.0060.02311.64
5.4.330.0040.00411.09
5.4.320.0070.02511.80
5.4.310.0040.02411.90
5.4.300.0050.02111.80
5.4.290.0080.02211.84
5.4.280.0040.02711.84
5.4.270.0040.02211.75
5.4.260.0070.02411.75
5.4.250.0080.02515.02
5.4.240.0100.02214.92
5.4.230.0100.02715.04
5.4.220.0050.03214.92
5.4.210.0050.02915.04
5.4.200.0120.02315.01
5.4.190.0080.02615.00
5.4.180.0050.02814.99
5.4.170.0060.02714.93
5.4.160.0100.02514.94
5.4.150.0020.03314.96
5.4.140.0040.03013.83
5.4.130.0050.02713.72
5.4.120.0100.02513.83
5.4.110.0030.03113.82
5.4.100.0050.02813.82
5.4.90.0030.02913.89
5.4.80.0020.03413.79
5.4.70.0000.03013.74
5.4.60.0050.02713.79
5.4.50.0120.02113.82
5.4.40.0070.02513.72
5.4.30.0180.03313.77
5.4.20.0100.02413.75
5.4.10.0120.02413.80
5.4.00.0030.03113.44
5.3.290.0070.02511.95
5.3.280.0080.02512.77
5.3.270.0050.03112.89
5.3.260.0080.02612.86
5.3.250.0080.02712.85
5.3.240.0070.02712.85
5.3.230.0030.03012.89
5.3.220.0090.02312.83
5.3.210.0060.03012.76
5.3.200.0090.02612.83
5.3.190.0030.03012.79
5.3.180.0130.02012.88
5.3.170.0020.03112.86
5.3.160.0060.02812.91
5.3.150.0020.02812.82
5.3.140.0070.02512.86
5.3.130.0080.02812.81
5.3.120.0050.03112.82
5.3.110.0000.03612.86
5.3.100.0100.03512.61
5.3.90.0050.03112.64
5.3.80.0070.02512.56
5.3.70.0080.02512.67
5.3.60.0050.02912.55
5.3.50.0050.02712.62
5.3.40.0060.02512.64
5.3.30.0040.02812.54
5.3.20.0070.02512.35
5.3.10.0100.02312.41
5.3.00.0030.02912.48
5.2.170.0000.04311.11
5.2.160.0030.04011.02
5.2.150.0000.04311.15
5.2.140.0130.03011.11
5.2.130.0100.03311.05
5.2.120.0070.04010.93
5.2.110.0030.04011.02
5.2.100.0030.03711.02
5.2.90.0000.04010.93
5.2.80.0100.03711.03
5.2.70.0030.04011.01
5.2.60.0000.04710.81
5.2.50.0070.03711.17
5.2.40.0000.04011.03
5.2.30.0070.03710.99
5.2.20.0100.03310.89
5.2.10.0070.03310.87
5.2.00.0130.03010.88
5.1.60.0000.0339.88
5.1.50.0000.0539.77
5.1.40.0030.0339.83
5.1.30.0100.03010.27
5.1.20.0070.03310.42
5.1.10.0030.03310.16
5.1.00.0130.02710.12
5.0.50.0030.0278.58
5.0.40.0000.0308.26
5.0.30.0030.0408.15
5.0.20.0030.0308.20
5.0.10.0030.0278.20
5.0.00.0000.0408.25
4.4.90.0030.0176.43
4.4.80.0000.0206.43
4.4.70.0000.0206.43
4.4.60.0030.0206.43
4.4.50.0000.0236.43
4.4.40.0030.0306.43
4.4.30.0030.0206.43
4.4.20.0000.0206.43
4.4.10.0100.0136.43
4.4.00.0000.0336.43
4.3.110.0000.0306.43
4.3.100.0030.0176.43
4.3.90.0130.0176.43
4.3.80.0070.0276.43
4.3.70.0000.0236.43
4.3.60.0030.0176.43
4.3.50.0030.0206.43
4.3.40.0000.0336.43
4.3.30.0000.0236.43
4.3.20.0000.0236.43
4.3.10.0000.0236.43
4.3.00.0000.0238.36

preferences:
37.65 ms | 401 KiB | 5 Q