3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function testMe() { $self = $this; $func = function () use ($self) { $self->callMe(); }; $func(); } private function callMe() { print "Called\n"; } } try { $a = new A(); $a->testMe(); } catch (Exception $e) { print "Getted exception: .".get_class($e).' msg: '.$e->getMessage().PHP_EOL; }

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.0160.00318.30
8.3.50.0140.00416.49
8.3.40.0120.00618.85
8.3.30.0070.00719.01
8.3.20.0040.00420.34
8.3.10.0040.00423.70
8.3.00.0030.00619.38
8.2.180.0060.00916.75
8.2.170.0080.00822.96
8.2.160.0080.00620.22
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0070.00022.09
8.2.110.0100.00020.52
8.2.100.0090.00317.63
8.2.90.0000.00719.17
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0030.00717.93
8.2.50.0030.00718.07
8.2.40.0050.00319.95
8.2.30.0030.00518.07
8.2.20.0080.00017.70
8.2.10.0000.00717.95
8.2.00.0000.00717.75
8.1.270.0090.00021.95
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00723.83
8.1.230.0120.00017.48
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0090.00017.23
8.1.190.0040.00417.10
8.1.180.0060.00318.10
8.1.170.0080.00018.71
8.1.160.0040.00422.07
8.1.150.0040.00418.90
8.1.140.0050.00317.51
8.1.130.0070.00017.76
8.1.120.0000.00817.46
8.1.110.0030.00517.54
8.1.100.0030.00417.45
8.1.90.0030.00517.41
8.1.80.0050.00217.39
8.1.70.0050.00317.43
8.1.60.0060.00317.62
8.1.50.0040.00417.59
8.1.40.0000.00817.53
8.1.30.0030.00617.66
8.1.20.0000.00717.56
8.1.10.0050.00217.46
8.1.00.0080.00017.52
8.0.300.0000.00718.77
8.0.290.0060.00316.63
8.0.280.0030.00318.50
8.0.270.0000.00717.27
8.0.260.0000.00717.14
8.0.250.0030.00316.86
8.0.240.0000.00616.82
8.0.230.0000.00817.00
8.0.220.0030.00316.80
8.0.210.0000.00716.88
8.0.200.0060.00416.97
8.0.190.0080.00016.98
8.0.180.0020.00516.91
8.0.170.0040.00416.77
8.0.160.0070.00016.98
8.0.150.0030.00516.83
8.0.140.0040.00416.75
8.0.130.0000.00613.32
8.0.120.0070.00016.84
8.0.110.0000.00716.84
8.0.100.0040.00416.83
8.0.90.0000.00716.77
8.0.80.0070.01616.84
8.0.70.0020.00516.95
8.0.60.0040.00416.93
8.0.50.0070.00016.77
8.0.30.0100.00917.10
8.0.20.0100.01217.40
8.0.10.0000.00717.09
8.0.00.0060.01316.78
7.4.330.0000.00615.05
7.4.320.0030.00316.59
7.4.300.0030.00316.42
7.4.290.0030.00316.60
7.4.280.0060.00316.64
7.4.270.0070.00016.62
7.4.260.0100.00016.52
7.4.250.0040.00416.64
7.4.240.0030.00416.45
7.4.230.0070.00016.50
7.4.220.0060.01216.63
7.4.210.0000.01516.69
7.4.200.0040.00416.71
7.4.160.0000.01616.40
7.4.150.0200.00317.40
7.4.140.0090.00917.86
7.4.130.0080.00816.51
7.4.120.0110.00616.56
7.4.110.0120.01216.42
7.4.100.0030.01416.41
7.4.90.0040.01816.42
7.4.80.0070.01019.39
7.4.70.0090.01216.64
7.4.60.0100.00716.46
7.4.50.0050.00316.62
7.4.40.0150.00316.43
7.4.30.0170.00316.61
7.4.00.0080.00915.04
7.3.330.0030.00313.32
7.3.320.0000.00513.13
7.3.310.0000.00716.35
7.3.300.0030.00316.19
7.3.290.0070.00816.35
7.3.280.0100.00816.27
7.3.270.0150.00317.40
7.3.260.0130.00616.58
7.3.250.0080.00916.34
7.3.240.0150.00416.16
7.3.230.0170.00716.39
7.3.210.0090.00616.52
7.3.200.0130.00319.39
7.3.190.0110.00716.54
7.3.180.0130.00316.26
7.3.170.0100.01016.27
7.3.160.0100.00616.59
7.3.120.0030.01514.73
7.3.110.0070.01014.83
7.3.100.0040.01514.71
7.3.90.0060.00314.68
7.3.80.0030.01014.84
7.3.70.0030.00614.69
7.3.60.0040.00814.73
7.3.50.0070.00714.76
7.3.40.0080.00014.69
7.3.30.0030.00614.80
7.3.20.0070.00716.55
7.3.10.0070.00716.47
7.3.00.0040.01116.75
7.2.330.0120.00616.74
7.2.320.0110.01116.72
7.2.310.0060.01216.69
7.2.300.0140.00316.82
7.2.290.0140.00316.61
7.2.250.0100.00314.73
7.2.240.0100.01014.94
7.2.230.0060.00615.27
7.2.220.0080.00414.82
7.2.210.0000.00915.29
7.2.200.0070.00414.90
7.2.190.0000.01015.10
7.2.180.0080.00815.00
7.2.170.0100.00315.13
7.2.60.0060.00617.02
7.2.00.0040.01819.48
7.1.330.0070.00715.63
7.1.320.0060.00615.92
7.1.310.0070.00715.68
7.1.300.0000.01215.63
7.1.290.0110.00415.88
7.1.280.0040.01115.48
7.1.270.0030.00915.91
7.1.260.0060.00615.48
7.1.200.0000.01215.70
7.1.100.0030.01317.97
7.1.70.0080.00017.14
7.1.60.0030.02019.11
7.1.50.0070.01816.85
7.1.00.0100.07022.48
7.0.200.0060.00316.63
7.0.140.0030.07022.08
7.0.60.0030.04020.06
7.0.50.0100.03317.72
7.0.40.0170.07720.20
7.0.30.0530.04020.06
7.0.20.0400.07020.06
7.0.10.0270.07020.09
7.0.00.0070.03720.25
5.6.280.0000.08020.90
5.6.210.0070.08320.57
5.6.200.0030.04318.23
5.6.190.0070.07020.77
5.6.180.3330.05020.39
5.6.170.0170.04320.56
5.6.160.0130.07720.45
5.6.150.0070.04018.29
5.6.140.0100.07718.18
5.6.130.0070.08018.28
5.6.120.0130.06020.91
5.6.110.0070.04021.03
5.6.100.0130.07320.99
5.6.90.0100.05720.98
5.6.80.0170.05320.54
5.6.70.4670.03020.42
5.5.350.0300.07320.45
5.5.340.0070.08018.02
5.5.330.0000.09020.58
5.5.320.0270.07320.38
5.5.310.0200.07320.38
5.5.300.0070.06318.08
5.5.290.0100.08018.05
5.5.280.0100.04320.90
5.5.270.0070.09020.68
5.5.260.0130.07720.80
5.5.250.0100.07020.48
5.5.240.0070.03720.28
5.4.450.1700.04019.55
5.4.440.0570.06019.44
5.4.430.0670.06019.23
5.4.420.0630.00019.51
5.4.410.0800.00019.23
5.4.400.0600.00018.92
5.4.390.0630.00019.21
5.4.380.0670.00019.02
5.4.370.0600.00019.16
5.4.360.0630.00019.18
5.4.350.0630.00019.10
5.4.340.0100.04612.02
5.4.320.0120.04712.51
5.4.310.0070.04712.51
5.4.300.0150.04812.52
5.4.290.0070.04412.51
5.4.280.0120.03712.40
5.4.270.0180.05012.40
5.4.260.0050.05112.41
5.4.250.0110.04312.41
5.4.240.0060.04412.40
5.4.230.0060.05112.39
5.4.220.0070.04912.39
5.4.210.0100.04712.39
5.4.200.0120.04512.39
5.4.190.0110.03712.39
5.4.180.0070.04612.39
5.4.170.0110.04412.40
5.4.160.0060.04712.39
5.4.150.0100.04812.39
5.4.140.0150.04412.08
5.4.130.0080.04512.07
5.4.120.0100.04612.03
5.4.110.0080.04312.02
5.4.100.0140.03212.02
5.4.90.0100.04612.02
5.4.80.0060.03912.02
5.4.70.0080.03312.02
5.4.60.0060.03912.02
5.4.50.0100.04512.02
5.4.40.0100.04212.01
5.4.30.0060.05012.00
5.4.20.0030.04112.00
5.4.10.0060.04712.00
5.4.00.0060.05011.49
5.3.290.0090.05512.80
5.3.280.0090.04912.70
5.3.270.0060.05812.72
5.3.260.0120.05112.72
5.3.250.0090.05112.72
5.3.240.0100.04112.72
5.3.230.0090.04112.71
5.3.220.0120.06012.68
5.3.210.0110.05912.68
5.3.200.0070.04312.68
5.3.190.0080.03812.68
5.3.180.0050.04012.67
5.3.170.0090.03612.67
5.3.160.0060.04612.67
5.3.150.0060.04212.67
5.3.140.0060.04212.66
5.3.130.0070.04212.66
5.3.120.0070.04112.66
5.3.110.0070.03812.66
5.3.100.0080.04112.13
5.3.90.0050.04012.11
5.3.80.0060.04312.10
5.3.70.0070.04012.11
5.3.60.0060.03612.10
5.3.50.0050.04312.04
5.3.40.0080.04512.04
5.3.30.0060.04212.00
5.3.20.0070.04111.78
5.3.10.0090.04011.74
5.3.00.0110.04111.73
5.2.170.0070.0369.22
5.2.160.0090.0409.22
5.2.150.0130.0649.22
5.2.140.0090.0429.22
5.2.130.0090.0389.18
5.2.120.0040.0399.18
5.2.110.0080.0319.18
5.2.100.0070.0339.18
5.2.90.0070.0329.18
5.2.80.0080.0359.17
5.2.70.0060.0409.18
5.2.60.0110.0519.13
5.2.50.0080.0569.10
5.2.40.0090.0509.07
5.2.30.0090.0579.05
5.2.20.0090.0369.04
5.2.10.0040.0348.94
5.2.00.0050.0418.81
5.1.60.0080.0318.10
5.1.50.0070.0268.09
5.1.40.0080.0288.07
5.1.30.0050.0298.42
5.1.20.0070.0298.44
5.1.10.0110.0438.17
5.1.00.0070.0338.17
5.0.50.0070.0316.64
5.0.40.0060.0236.50
5.0.30.0050.0396.31
5.0.20.0050.0256.28
5.0.10.0050.0266.25
5.0.00.0030.0326.25
4.4.90.0040.0154.78
4.4.80.0040.0164.76
4.4.70.0100.0474.75
4.4.60.0040.0194.76
4.4.50.0030.0174.77
4.4.40.0030.0274.71
4.4.30.0020.0174.76
4.4.20.0020.0194.84
4.4.10.0040.0184.85
4.4.00.0030.0304.76
4.3.110.0040.0194.67
4.3.100.0030.0214.67
4.3.90.0060.0194.63
4.3.80.0050.0354.59
4.3.70.0040.0194.63
4.3.60.0010.0184.63
4.3.50.0040.0174.63
4.3.40.0040.0284.54
4.3.30.0020.0203.30
4.3.20.0040.0183.28
4.3.10.0040.0233.24
4.3.00.0030.01712.38

preferences:
59.9 ms | 400 KiB | 5 Q