3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $foo = 'bar'; } $bar = function() { $foo = 'bar'; }; $tries = 1E5; $start = microtime(true); for ($i = 0; $i < $tries; $i++) { foo(); } echo (microtime(true) - $start); $start = microtime(true); for ($i = 0; $i < $tries; $i++) { $bar(); } echo (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.0080.01915.11
7.4.00.0080.01614.83
7.3.130.0080.01514.85
7.3.120.0080.01714.83
7.3.110.0080.01814.80
7.3.100.0110.01114.60
7.3.90.0080.01014.88
7.3.80.0090.01314.71
7.3.70.0060.01214.95
7.3.60.0050.01414.78
7.3.50.0080.01114.79
7.3.40.0080.01114.65
7.3.30.0050.01614.71
7.3.20.0060.01516.59
7.3.10.0050.01316.49
7.3.00.0050.01216.67
7.2.260.0030.02214.86
7.2.250.0070.02014.93
7.2.240.0070.01615.02
7.2.230.0040.01714.96
7.2.220.0100.01214.99
7.2.210.0060.01615.21
7.2.200.0070.01415.09
7.2.190.0070.01314.92
7.2.180.0030.01515.05
7.2.170.0040.01515.05
7.2.160.0070.01614.96
7.2.150.0080.01316.85
7.2.140.0010.01916.88
7.2.130.0040.01916.86
7.2.120.0040.01817.02
7.2.110.0030.01616.94
7.2.100.0090.01116.99
7.2.90.0030.02016.87
7.2.80.0100.01216.92
7.2.70.0050.01717.04
7.2.60.0060.01716.89
7.2.50.0070.01217.00
7.2.40.0060.01516.86
7.2.30.0070.01416.88
7.2.20.0060.01616.88
7.2.10.0080.01316.99
7.2.00.0070.01317.31
7.1.330.0070.02715.72
7.1.320.0060.02515.69
7.1.310.0060.02615.43
7.1.300.0040.02815.54
7.1.290.0060.02515.80
7.1.280.0070.02415.72
7.1.270.0050.02515.69
7.1.260.0030.02715.55
7.1.250.0050.02415.73
7.1.240.0050.02515.62
7.1.230.0050.02515.72
7.1.220.0010.02815.72
7.1.210.0040.02515.67
7.1.200.0100.02115.68
7.1.190.0070.02215.53
7.1.180.0050.02615.54
7.1.170.0080.02315.75
7.1.160.0060.02215.73
7.1.150.0070.02515.68
7.1.140.0040.02715.63
7.1.130.0070.02415.76
7.1.120.0060.02615.69
7.1.110.0060.02515.74
7.1.100.0070.02115.74
7.1.90.0060.02315.62
7.1.80.0050.02415.70
7.1.70.0050.02216.19
7.1.60.0100.02316.62
7.1.50.0080.02220.41
7.1.40.0070.02315.71
7.1.30.0030.02515.66
7.1.20.0060.02315.76
7.1.10.0040.02615.71
7.1.00.0050.04017.44
7.0.330.0030.02815.24
7.0.320.0030.02815.28
7.0.310.0050.02815.48
7.0.300.0080.02215.40
7.0.290.0020.02515.28
7.0.280.0060.02215.36
7.0.270.0070.02115.25
7.0.260.0040.02715.30
7.0.250.0030.02815.41
7.0.240.0070.02215.32
7.0.230.0040.02715.38
7.0.220.0070.02815.36
7.0.210.0010.03315.33
7.0.200.0060.02115.63
7.0.190.0070.02615.33
7.0.180.0050.02615.34
7.0.170.0070.02415.50
7.0.160.0040.02515.29
7.0.150.0060.02415.42
7.0.140.0060.03817.01
7.0.130.0050.03015.20
7.0.120.0090.02315.31
7.0.110.0020.03015.41
7.0.100.0030.02715.47
7.0.90.0200.04216.54
7.0.80.0210.03816.49
7.0.70.0150.04016.50
7.0.60.0170.03916.47
7.0.50.0150.04116.57
7.0.40.0030.03515.13
7.0.30.0040.04115.03
7.0.20.0080.03715.10
7.0.10.0070.03315.11
7.0.00.0060.04215.16
5.6.400.0030.04714.53
5.6.390.0060.04514.20
5.6.380.0080.04414.24
5.6.370.0060.04414.22
5.6.360.0090.04714.38
5.6.350.0050.05114.36
5.6.340.0050.04514.15
5.6.330.0070.04414.42
5.6.320.0060.04614.20
5.6.310.0070.04314.25
5.6.300.0040.05014.36
5.6.290.0050.04814.33
5.6.280.0050.06015.93
5.6.270.0000.05214.23
5.6.260.0060.04614.34
5.6.250.0060.04614.33
5.6.240.0050.04414.41
5.6.230.0080.06615.98
5.6.220.0070.06115.92
5.6.210.0090.06215.84
5.6.200.0080.05616.03
5.6.190.0070.05016.06
5.6.180.0070.06416.10
5.6.170.0080.06115.97
5.6.160.0070.05216.03
5.6.150.0090.05915.96
5.6.140.0070.06816.08
5.6.130.0040.07016.01
5.6.120.0030.04915.93
5.6.110.0040.05615.88
5.6.100.0070.05215.98
5.6.90.0070.04915.99
5.6.80.0080.06015.68
5.6.70.0040.06715.83
5.6.60.0040.05215.71
5.6.50.0060.06415.72
5.6.40.0070.06115.76
5.6.30.0040.05915.87
5.6.20.0080.06115.73
5.6.10.0030.06115.73
5.6.00.0070.06315.88
5.5.380.0040.04514.16
5.5.370.0070.06115.84
5.5.360.0040.05215.92
5.5.350.0030.05915.88
5.5.340.0050.06516.03
5.5.330.0050.06815.92
5.5.320.0080.06416.00
5.5.310.0060.06516.01
5.5.300.0080.05515.98
5.5.290.0070.05415.87
5.5.280.0030.06815.84
5.5.270.0030.06815.85
5.5.260.0060.05715.98
5.5.250.0070.06015.70
5.5.240.0040.05315.62
5.5.230.0050.05915.68
5.5.220.0070.05815.72
5.5.210.0020.06515.69
5.5.200.0040.06515.76
5.5.190.0070.06115.71
5.5.180.0040.06215.60
5.5.170.0020.04814.31
5.5.160.0030.06115.64
5.5.150.0050.05515.68
5.5.140.0030.05015.74
5.5.130.0030.06515.74
5.5.120.0040.06215.79
5.5.110.0050.05315.73
5.5.100.0040.07115.73
5.5.90.0040.06415.66
5.5.80.0020.05515.71
5.5.70.0030.05915.64
5.5.60.0070.06215.63
5.5.50.0040.05115.55
5.5.40.0050.04915.73
5.5.30.0020.06315.67
5.5.20.0070.06415.65
5.5.10.0070.06415.55
5.5.00.0070.06215.60
5.4.450.0030.05513.73
5.4.440.0030.05113.79
5.4.430.0040.05213.79
5.4.420.0060.06013.77
5.4.410.0030.06113.68
5.4.400.0050.05913.73
5.4.390.0070.06413.63
5.4.380.0070.06113.58
5.4.370.0040.06213.66
5.4.360.0050.06513.63
5.4.350.0030.06813.67
5.4.340.0060.06013.67
5.4.330.0020.04811.90
5.4.320.0020.05713.70
5.4.310.0040.06313.71
5.4.300.0040.06113.66
5.4.290.0020.05413.71
5.4.280.0030.06313.75
5.4.270.0050.05813.62
5.4.260.0060.06313.63
5.4.250.0020.04913.71
5.4.240.0050.06413.71
5.4.230.0030.05713.60
5.4.220.0060.06813.69
5.4.210.0050.05413.67
5.4.200.0060.06513.62
5.4.190.0030.05513.71
5.4.180.0040.05713.66
5.4.170.0120.05813.70
5.4.160.0050.06513.61
5.4.150.0070.06213.67
5.4.140.0030.06813.00
5.4.130.0050.06412.99
5.4.120.0020.05713.06
5.4.110.0050.05913.10
5.4.100.0030.06612.96
5.4.90.0080.06213.03
5.4.80.0070.06213.02
5.4.70.0060.06813.00
5.4.60.0070.06213.04
5.4.50.0040.05913.09
5.4.40.0040.06713.09
5.4.30.0060.06612.96
5.4.20.0020.05713.06
5.4.10.0040.06113.07
5.4.00.0050.06012.94
5.3.290.0050.06212.77
5.3.280.0020.07312.78
5.3.270.0080.05812.81
5.3.260.0040.07612.80
5.3.250.0060.07912.83
5.3.240.0060.07412.80
5.3.230.0060.05712.80
5.3.220.0030.07712.76
5.3.210.0050.07212.71
5.3.200.0080.06612.68
5.3.190.0020.07112.78
5.3.180.0030.07512.80
5.3.170.0030.07612.81
5.3.160.0060.06712.80
5.3.150.0030.07112.84
5.3.140.0020.07212.78
5.3.130.0040.07412.77
5.3.120.0040.07012.79
5.3.110.0070.07112.78
5.3.100.0020.06912.72
5.3.90.0050.07012.79
5.3.80.0070.05812.75
5.3.70.0090.06612.72
5.3.60.0030.06812.78
5.3.50.0020.06612.72
5.3.40.0020.07612.73
5.3.30.0050.07312.73
5.3.20.0060.05612.77
5.3.10.0020.06512.71
5.3.00.0020.06712.71
5.2.170.0130.06315.94
5.2.160.0100.05715.94
5.2.150.0000.06315.94
5.2.140.0030.04315.94
5.2.130.0070.02315.94
5.2.120.0070.06015.94
5.2.110.0100.03715.94
5.2.100.0070.04315.94
5.2.90.0100.05715.94
5.2.80.0000.05715.94
5.2.70.0100.05715.94
5.2.60.0070.06015.94
5.2.50.0070.06015.94
5.2.40.0100.05715.94
5.2.30.0030.06015.94
5.2.20.0100.03315.94
5.2.10.0000.05315.94
5.2.00.0030.06315.94
5.1.60.0030.05315.94
5.1.50.0000.06315.94
5.1.40.0100.04315.94
5.1.30.0070.05315.94
5.1.20.0070.05015.94
5.1.10.0070.05715.94
5.1.00.0070.05015.94
5.0.50.0000.04715.94
5.0.40.0000.02015.94
5.0.30.0030.04015.94
5.0.20.0030.03015.94
5.0.10.0000.02015.94
5.0.00.0030.03015.94
4.4.90.0000.02715.94
4.4.80.0070.02715.94
4.4.70.0030.03315.94
4.4.60.0000.03715.94
4.4.50.0000.02715.94
4.4.40.0030.03315.94
4.4.30.0030.03315.94
4.4.20.0030.02015.94
4.4.10.0030.03715.94
4.4.00.0070.02015.94
4.3.110.0000.02315.94
4.3.100.0000.03715.94
4.3.90.0030.01315.94
4.3.80.0000.03015.94
4.3.70.0000.01715.94
4.3.60.0000.01715.94
4.3.50.0030.01315.94
4.3.40.0000.02315.94
4.3.30.0000.01715.94
4.3.20.0000.01715.94
4.3.10.0000.01715.94
4.3.00.0000.02715.94

preferences:
42.01 ms | 401 KiB | 5 Q