3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $chosen = "get_emails"; public function bar(): callable { return function() { $this->{$this->chosen}(); }; } public function get_emails(): void { echo __METHOD__; } } $foo = new Foo(); $func = $foo->bar(); $func();

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.0140.00416.75
8.3.50.0090.00617.98
8.3.40.0070.00718.83
8.3.30.0120.00318.43
8.3.20.0040.00418.55
8.3.10.0050.00321.91
8.3.00.0050.00221.60
8.2.180.0070.00718.29
8.2.170.0120.00322.96
8.2.160.0070.00720.47
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00822.20
8.2.120.0000.00826.35
8.2.110.0040.00819.39
8.2.100.0070.00717.70
8.2.90.0000.00817.63
8.2.80.0080.00017.97
8.2.70.0000.00817.68
8.2.60.0090.00018.03
8.2.50.0060.00318.10
8.2.40.0100.00019.29
8.2.30.0070.00022.41
8.2.20.0000.00718.18
8.2.10.0030.00518.05
8.2.00.0030.00518.18
8.1.280.0080.00825.92
8.1.270.0050.00320.20
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00324.02
8.1.230.0080.00417.76
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0070.00317.35
8.1.180.0060.00318.10
8.1.170.0030.00518.43
8.1.160.0000.00718.89
8.1.150.0050.00218.85
8.1.140.0040.00418.89
8.1.130.0090.00020.19
8.1.120.0030.00317.40
8.1.110.0040.00417.44
8.1.100.0040.00417.43
8.1.90.0000.00717.34
8.1.80.0040.00417.41
8.1.70.0080.00417.42
8.1.60.0000.00717.44
8.1.50.0040.00417.52
8.1.40.0060.00317.48
8.1.30.0000.00817.51
8.1.20.0040.00417.69
8.1.10.0000.00717.60
8.1.00.0090.00017.48
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.41
8.0.270.0000.00817.20
8.0.260.0060.00018.45
8.0.250.0040.00416.93
8.0.240.0070.00016.80
8.0.230.0030.00316.81
8.0.220.0000.00816.80
8.0.210.0000.00816.80
8.0.200.0000.00716.95
8.0.190.0040.00416.89
8.0.180.0000.00716.90
8.0.170.0060.00316.96
8.0.160.0000.00716.93
8.0.150.0000.00816.91
8.0.140.0050.00316.91
8.0.130.0060.00013.40
8.0.120.0000.00816.79
8.0.110.0000.00716.79
8.0.100.0030.00616.96
8.0.90.0000.00716.78
8.0.80.0090.00816.94
8.0.70.0070.00016.75
8.0.60.0000.00716.77
8.0.50.0040.00416.76
8.0.30.0100.00916.95
8.0.20.0110.00917.40
8.0.10.0030.00317.00
8.0.00.0050.01216.70
7.4.330.0050.00015.55
7.4.320.0060.00016.54
7.4.300.0040.00416.49
7.4.290.0000.00716.51
7.4.280.0040.00416.52
7.4.270.0030.00316.53
7.4.260.0070.00016.52
7.4.250.0040.00416.54
7.4.240.0000.00816.60
7.4.230.0000.00816.50
7.4.220.0040.00416.60
7.4.210.0120.00716.52
7.4.200.0000.00716.50
7.4.160.0110.00416.61
7.4.140.0120.00617.86
7.4.130.0150.00616.53
7.4.120.0100.00916.49
7.4.110.0090.00916.46
7.4.100.0030.01316.55
7.4.90.0050.01416.60
7.4.80.0100.00719.39
7.4.70.0070.01016.49
7.4.60.0090.00916.37
7.4.50.0040.01116.43
7.4.40.0060.01616.59
7.4.00.0030.01314.95
7.3.330.0050.00013.14
7.3.320.0030.00313.30
7.3.310.0030.00616.33
7.3.300.0030.00616.25
7.3.290.0000.00716.26
7.3.280.0030.01316.24
7.3.260.0090.01016.39
7.3.240.0070.01416.38
7.3.230.0110.00716.44
7.3.210.0130.00916.19
7.3.200.0090.00916.55
7.3.190.0120.00916.46
7.3.180.0030.01216.38
7.3.170.0160.00616.32
7.3.160.0040.01716.49
7.3.120.0030.01014.43
7.3.110.0030.01014.43
7.3.100.0030.01315.02
7.3.90.0040.00714.73
7.3.80.0030.00714.89
7.3.70.0000.01214.84
7.3.60.0060.00614.68
7.3.50.0080.00614.56
7.3.40.0030.01314.66
7.3.30.0040.01114.66
7.3.20.0030.00716.53
7.3.10.0030.01016.40
7.3.00.0070.00516.56
7.2.330.0090.01216.81
7.2.320.0100.00716.60
7.2.310.0060.01216.77
7.2.300.0150.00316.42
7.2.290.0170.00316.63
7.2.240.0040.01115.08
7.2.230.0070.00714.66
7.2.220.0060.00614.84
7.2.210.0060.00614.98
7.2.200.0070.00714.72
7.2.190.0090.00314.93
7.2.180.0040.01215.00
7.2.170.0070.01015.07
7.2.160.0030.01514.71
7.2.150.0000.00816.88
7.2.140.0030.00716.87
7.2.130.0100.00516.69
7.2.120.0080.00516.97
7.2.110.0070.00516.75
7.2.100.0280.00416.03
7.2.90.0390.00416.08
7.2.80.0340.00716.17
7.2.70.0480.00916.13
7.2.60.0310.01116.30
7.2.50.0430.00816.26
7.2.40.0420.01016.24
7.2.30.0400.00416.24
7.2.20.0480.00716.12
7.2.10.0300.00616.20
7.2.00.0280.00916.17
7.1.330.0070.00715.72
7.1.320.0030.01015.79
7.1.310.0050.00515.58
7.1.300.0130.00315.66
7.1.290.0040.00815.53
7.1.280.0040.00715.70
7.1.270.0060.00615.67
7.1.260.0000.01415.56
7.1.250.0040.01115.71
7.1.220.1230.00313.67
7.1.210.0850.00313.80
7.1.200.0960.00613.89
7.1.190.0900.01013.82
7.1.180.0970.00613.74
7.1.170.1130.00713.45
7.1.160.0820.00713.66
7.1.150.0930.00613.62
7.1.140.0920.01013.61
7.1.130.0790.00313.66
7.1.120.0910.00313.68
7.1.110.1060.00713.54
7.1.100.0700.00613.80
7.1.90.1170.00613.79
7.1.80.1110.01013.75
7.1.70.0990.00313.72
7.1.60.1310.01031.91
7.1.50.1140.01031.64
7.1.40.1070.01031.97
7.1.30.0960.01031.72
7.1.20.1110.01031.57
7.1.10.1470.00313.55
7.1.00.1120.00713.81
5.6.380.0100.00314.07

preferences:
43.6 ms | 400 KiB | 5 Q