3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function _foo($v) { echo __METHOD__ . $v; } public function doit() { $that = $this; $closure = function() use ($that) { $that->_foo('value'); }; $that = 5; $closure(); } } $a = new A(); $a->doit();

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)
8.3.60.0070.00716.38
8.3.50.0030.01422.04
8.3.40.0110.01118.79
8.3.30.0070.00719.04
8.3.20.0040.00420.29
8.3.10.0080.00023.53
8.3.00.0000.00821.01
8.2.180.0070.01016.38
8.2.170.0070.00722.96
8.2.160.0130.00020.39
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0070.00320.79
8.2.110.0090.00020.47
8.2.100.0070.00419.52
8.2.90.0050.00219.07
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0080.00417.90
8.2.50.0040.00418.07
8.2.40.0060.00321.16
8.2.30.0040.00418.30
8.2.20.0000.00717.66
8.2.10.0070.00018.13
8.2.00.0040.00417.61
8.1.280.0090.00625.92
8.1.270.0080.00023.88
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.95
8.1.230.0070.00319.01
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.22
8.1.180.0000.00818.10
8.1.170.0040.00418.59
8.1.160.0030.00522.02
8.1.150.0000.00718.69
8.1.140.0000.00717.37
8.1.130.0030.00317.73
8.1.120.0030.00317.40
8.1.110.0000.00717.44
8.1.100.0040.00417.45
8.1.90.0060.00317.50
8.1.80.0000.00717.38
8.1.70.0070.00017.45
8.1.60.0000.00817.62
8.1.50.0030.00617.53
8.1.40.0040.00417.50
8.1.30.0060.00317.49
8.1.20.0050.00317.59
8.1.10.0020.00517.45
8.1.00.0040.00417.61
8.0.300.0080.00018.77
8.0.290.0030.00317.16
8.0.280.0030.00318.36
8.0.270.0050.00317.32
8.0.260.0040.00417.32
8.0.250.0070.00017.01
8.0.240.0000.00716.91
8.0.230.0000.00816.91
8.0.220.0070.00016.79
8.0.210.0030.00316.80
8.0.200.0000.00617.00
8.0.190.0000.00716.84
8.0.180.0000.00816.97
8.0.170.0000.00716.90
8.0.160.0030.00316.86
8.0.150.0000.00816.82
8.0.140.0070.00016.84
8.0.130.0000.00513.37
8.0.120.0060.00316.86
8.0.110.0080.00016.84
8.0.100.0040.00416.95
8.0.90.0000.00716.78
8.0.80.0180.00416.95
8.0.70.0000.00716.69
8.0.60.0050.00216.84
8.0.50.0040.00416.84
8.0.30.0120.00916.92
8.0.20.0090.01417.40
8.0.10.0020.00516.97
8.0.00.0080.01016.61
7.4.330.0000.00515.00
7.4.320.0000.00616.61
7.4.300.0030.00316.59
7.4.290.0000.00716.56
7.4.280.0050.00516.41
7.4.270.0070.00016.56
7.4.260.0070.00016.39
7.4.250.0050.00216.42
7.4.240.0050.00216.53
7.4.230.0030.00516.63
7.4.220.0070.01116.56
7.4.210.0050.00916.57
7.4.200.0000.00816.63
7.4.190.0030.00316.77
7.4.160.0080.00816.45
7.4.150.0110.00717.40
7.4.140.0070.01017.86
7.4.130.0120.00716.61
7.4.120.0100.00716.52
7.4.110.0100.00716.38
7.4.100.0080.01216.68
7.4.90.0030.01416.59
7.4.80.0100.01019.39
7.4.70.0080.00816.41
7.4.60.0060.01216.34
7.4.50.0040.00416.57
7.4.40.0150.00316.47
7.4.30.0100.00716.31
7.4.00.0100.00714.80
7.3.330.0000.00513.28
7.3.320.0060.00013.15
7.3.310.0080.00016.12
7.3.300.0070.00016.11
7.3.290.0100.01016.28
7.3.280.0090.01016.34
7.3.270.0110.00717.40
7.3.260.0130.00316.30
7.3.250.0140.00916.29
7.3.240.0030.02016.24
7.3.230.0160.00316.39
7.3.210.0070.01016.38
7.3.200.0160.00019.39
7.3.190.0030.01416.36
7.3.180.0060.01516.23
7.3.170.0090.00616.39
7.3.160.0140.00316.33
7.3.120.0100.00614.71
7.2.330.0070.01116.52
7.2.320.0090.00916.69
7.2.310.0040.01216.66
7.2.300.0100.00716.71
7.2.290.0090.00916.40
7.2.00.0000.01219.31
7.1.100.0110.00317.91
7.1.70.0100.00717.18
7.1.60.0060.00617.33
7.1.50.0030.01716.90
7.1.00.0100.07022.57
7.0.200.0000.01516.85
7.0.140.0000.08022.09
7.0.60.0200.07020.00
7.0.50.0100.08017.83
7.0.40.0030.06720.18
7.0.30.0300.07320.09
7.0.20.0230.05720.12
7.0.10.0030.09320.12
7.0.00.0000.09720.20
5.6.280.0000.07721.02
5.6.210.0170.07020.48
5.6.200.0100.07718.26
5.6.190.0030.07320.47
5.6.180.0130.03720.52
5.6.170.0230.05320.62
5.6.160.0100.04720.48
5.6.150.0030.05018.16
5.6.140.0130.06718.23
5.6.130.0130.08018.28
5.6.120.0070.04321.00
5.6.110.0000.05021.13
5.6.100.0130.07721.14
5.6.90.0030.08020.98
5.6.80.0130.05320.44
5.5.350.3970.04020.43
5.5.340.0030.04718.00
5.5.330.0130.06720.27
5.5.320.0300.06720.19
5.5.310.0230.08720.38
5.5.300.0030.05318.04
5.5.290.0000.08717.95
5.5.280.0130.08320.88
5.5.270.0070.04720.74
5.5.260.0000.08020.88
5.5.250.0030.04320.62
5.5.240.0030.07020.26
5.4.450.0200.05021.99
5.4.440.0300.02719.63
5.4.430.0370.05319.27
5.4.420.0500.04019.32
5.4.410.0130.04719.39
5.4.400.0200.03319.18
5.4.390.0230.05018.83
5.4.380.0100.05718.62
5.4.370.0230.04318.78
5.4.360.0130.05318.50
5.4.350.0130.06018.60
5.4.340.0100.06018.78
5.4.320.0090.03412.51
5.4.310.0040.04612.50
5.4.300.0090.05412.51
5.4.290.0070.05112.50
5.4.280.0080.04212.40
5.4.270.0080.04912.39
5.4.260.0100.04912.40
5.4.250.0060.05212.40
5.4.240.0060.05112.40
5.4.230.0100.04912.39
5.4.220.0100.04812.39
5.4.210.0070.05212.39
5.4.200.0090.05412.39
5.4.190.0110.05112.39
5.4.180.0110.05112.39
5.4.170.0060.05412.40
5.4.160.0070.05012.39
5.4.150.0120.04512.39
5.4.140.0090.04112.07
5.4.130.0060.03812.06
5.4.120.0100.03112.02
5.4.110.0070.03712.02
5.4.100.0080.05312.02
5.4.90.0100.04912.02
5.4.80.0100.03912.01
5.4.70.0100.03712.01
5.4.60.0100.04312.01
5.4.50.0110.04712.01
5.4.40.0090.05712.00
5.4.30.0170.05712.00
5.4.20.0110.04211.99
5.4.10.0100.04912.00
5.4.00.0120.04511.48
5.3.290.0060.04112.80
5.3.280.0070.06512.71
5.3.270.0080.05312.72
5.3.260.0120.04712.72
5.3.250.0080.05112.71
5.3.240.0070.05212.72
5.3.230.0110.05812.71
5.3.220.0170.07212.68
5.3.210.0230.08412.68
5.3.200.0160.09912.68
5.3.190.0080.05412.68
5.3.180.0100.06412.67
5.3.170.0110.08412.67
5.3.160.0040.04312.67
5.3.150.0090.04012.67
5.3.140.0060.03712.66
5.3.130.0060.04512.66
5.3.120.0070.03912.66
5.3.110.0080.04412.66
5.3.100.0050.03912.12
5.3.90.0070.03612.11
5.3.80.0050.03812.10
5.3.70.0080.04112.10
5.3.60.0110.03812.09
5.3.50.0050.04412.04
5.3.40.0060.04212.04
5.3.30.0120.03911.99
5.3.20.0040.04111.78
5.3.10.0050.04511.74
5.3.00.0090.03911.72
5.2.170.0080.0329.23
5.2.160.0020.0319.22
5.2.150.0060.0309.23
5.2.140.0070.0379.22
5.2.130.0050.0359.18
5.2.120.0090.0319.18
5.2.110.0030.0379.19
5.2.100.0060.0299.18
5.2.90.0020.0389.18
5.2.80.0050.0409.18
5.2.70.0090.0379.18
5.2.60.0080.0389.13
5.2.50.0100.0349.10
5.2.40.0070.0349.08
5.2.30.0080.0379.05
5.2.20.0030.0439.04
5.2.10.0080.0338.95
5.2.00.0070.0378.81
5.1.60.0080.0298.09
5.1.50.0060.0328.09
5.1.40.0040.0348.07
5.1.30.0060.0348.43
5.1.20.0080.0348.44
5.1.10.0060.0328.17
5.1.00.0090.0298.17
5.0.50.0050.0266.64
5.0.40.0070.0236.51
5.0.30.0060.0376.32
5.0.20.0040.0256.29
5.0.10.0020.0286.26
5.0.00.0030.0376.25
4.4.90.0050.0184.78
4.4.80.0050.0184.76
4.4.70.0050.0184.75
4.4.60.0060.0174.76
4.4.50.0040.0204.77
4.4.40.0020.0334.71
4.4.30.0020.0214.76
4.4.20.0030.0224.85
4.4.10.0040.0214.85
4.4.00.0030.0324.76
4.3.110.0050.0204.67
4.3.100.0040.0214.67
4.3.90.0050.0184.63
4.3.80.0030.0304.58
4.3.70.0050.0174.63
4.3.60.0020.0204.63
4.3.50.0040.0204.63
4.3.40.0030.0364.54
4.3.30.0020.0203.30
4.3.20.0040.0203.28
4.3.10.0050.0173.23
4.3.00.0030.02014.75

preferences:
40.47 ms | 401 KiB | 5 Q