3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public function foo() { return 1; } public function get($context) { $f = function() { var_dump($this->foo(), static::foo()); return $this->foo() === static::foo(); }; $f->bindTo($context); return $f; } } class Baz { public function foo() { return 2; } } $bar = new Bar; $baz = new Baz; var_dump(call_user_func($bar->get($baz)));

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.40.0140.00718.84
8.3.30.0150.00018.73
8.3.20.0000.00818.77
8.3.10.0000.00818.73
8.3.00.0030.00619.51
8.2.170.0140.00422.96
8.2.160.0110.00418.57
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00019.56
8.2.110.0030.00619.08
8.2.100.0000.01218.04
8.2.90.0050.00319.17
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0080.00018.10
8.2.40.0040.00418.34
8.2.30.0070.00317.63
8.2.20.0030.00617.63
8.2.10.0040.00417.79
8.2.00.0030.00617.72
8.1.270.0090.00023.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.05
8.1.230.0150.00017.45
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0090.00017.35
8.1.190.0000.00817.22
8.1.180.0050.00318.10
8.1.170.0030.00618.57
8.1.160.0000.00719.06
8.1.150.0050.00318.68
8.1.140.0030.00517.45
8.1.130.0040.00417.38
8.1.120.0000.00717.36
8.1.110.0030.00517.45
8.1.100.0000.00717.36
8.1.90.0000.00817.53
8.1.80.0030.00317.38
8.1.70.0000.00717.34
8.1.60.0040.00417.63
8.1.50.0080.00017.49
8.1.40.0030.00517.53
8.1.30.0050.00317.59
8.1.20.0060.00317.60
8.1.10.0000.00917.48
8.1.00.0060.00317.52
8.0.300.0050.00218.77
8.0.290.0060.00316.63
8.0.280.0000.00718.35
8.0.270.0030.00517.11
8.0.260.0000.00816.76
8.0.250.0060.00316.79
8.0.240.0030.00316.88
8.0.230.0000.00716.91
8.0.220.0040.00416.93
8.0.210.0000.00616.80
8.0.200.0030.00816.91
8.0.190.0050.00316.96
8.0.180.0070.00016.83
8.0.170.0030.00616.95
8.0.160.0030.00317.00
8.0.150.0080.00016.88
8.0.140.0040.00416.69
8.0.130.0030.00313.43
8.0.120.0040.00416.73
8.0.110.0040.00416.76
8.0.100.0080.00016.73
8.0.90.0070.00016.92
8.0.80.0080.00816.84
8.0.70.0040.00416.85
8.0.60.0000.00816.76
8.0.50.0000.00816.70
8.0.30.0120.00917.21
8.0.20.0150.00717.21
8.0.10.0070.00016.84
8.0.00.0110.00716.50
7.4.330.0030.00312.97
7.4.320.0000.00616.62
7.4.300.0000.00716.59
7.4.290.0000.00816.48
7.4.280.0030.00516.61
7.4.270.0030.00316.58
7.4.260.0030.00313.21
7.4.250.0080.00016.63
7.4.240.0000.00716.37
7.4.230.0030.00616.57
7.4.220.0070.01116.55
7.4.210.0090.00616.54
7.4.200.0000.00716.67
7.4.190.0000.00816.56
7.4.160.0070.01316.34
7.4.150.0030.01416.63
7.4.140.0140.00417.86
7.4.130.0150.00616.47
7.4.120.0060.01216.41
7.4.110.0150.00916.48
7.4.100.0030.01316.52
7.4.90.0100.01016.53
7.4.80.0030.01319.39
7.4.70.0100.01016.60
7.4.60.0120.00316.34
7.4.50.0060.00316.52
7.4.40.0130.00316.31
7.4.30.0090.01216.41
7.4.10.0080.01114.63
7.4.00.0080.00914.90
7.3.330.0000.00613.33
7.3.320.0030.00313.27
7.3.310.0040.00416.43
7.3.300.0000.00616.31
7.3.290.0050.01316.28
7.3.280.0070.00716.27
7.3.270.0130.00416.57
7.3.260.0030.02016.63
7.3.240.0100.00716.26
7.3.230.0110.00716.46
7.3.210.0060.01116.24
7.3.200.0070.01016.19
7.3.190.0150.00816.34
7.3.180.0100.00716.22
7.3.170.0140.00716.23
7.3.160.0090.00616.38
7.3.130.0120.00614.63
7.3.120.0090.00814.72
7.3.110.0060.01314.68
7.3.100.0050.01014.73
7.3.90.0080.01014.63
7.3.80.0040.00714.73
7.3.70.0090.00514.71
7.3.60.0050.01014.83
7.3.50.0090.00614.60
7.3.40.0100.00814.82
7.3.30.0100.00214.80
7.3.20.0120.00216.72
7.3.10.0050.01016.47
7.3.00.0030.01216.72
7.2.330.0000.01716.63
7.2.320.0080.00816.65
7.2.310.0070.01016.61
7.2.300.0100.00716.40
7.2.290.0080.01616.62
7.2.260.0040.01414.90
7.2.250.0060.01315.22
7.2.240.0030.01315.16
7.2.230.0030.01214.85
7.2.220.0040.01214.96
7.2.210.0050.01014.93
7.2.200.0100.00615.00
7.2.190.0070.00714.91
7.2.180.0060.01114.93
7.2.170.0120.00215.08
7.2.160.0100.00315.09
7.2.150.0000.01616.74
7.2.140.0100.00616.89
7.2.130.0120.00016.96
7.2.120.0110.00316.89
7.2.110.0070.01016.79
7.2.100.0030.01416.82
7.2.90.0060.00916.87
7.2.80.0060.00316.99
7.2.70.0060.00316.88
7.2.60.0040.00716.95
7.2.50.0070.00716.95
7.2.40.0100.01016.92
7.2.30.0000.01416.57
7.2.20.0060.01016.97
7.2.10.0120.00316.94
7.2.00.0050.00917.96
7.1.330.0040.00915.81
7.1.320.0040.01015.61
7.1.310.0050.01015.61
7.1.300.0030.01015.72
7.1.290.0050.00815.81
7.1.280.0030.00915.71
7.1.270.0020.01015.62
7.1.260.0050.00815.79
7.1.250.0080.00415.46
7.1.240.0090.00615.55
7.1.230.0030.01115.66
7.1.220.0070.01015.31
7.1.210.0030.01015.66
7.1.200.0000.01415.66
7.1.190.0060.00315.63
7.1.180.0030.00615.68
7.1.170.0110.00415.55
7.1.160.0000.01515.70
7.1.150.0060.00315.57
7.1.140.0040.00715.59
7.1.130.0000.01115.71
7.1.120.0030.00615.72
7.1.110.0080.00315.45
7.1.100.0020.00717.01
7.1.90.0030.01015.54
7.1.80.0070.00715.54
7.1.70.0090.00116.35
7.1.60.0020.01016.33
7.1.50.0060.00825.30
7.1.40.0000.01315.60
7.1.30.0060.00615.41
7.1.20.0030.00615.73
7.1.10.0060.00315.63
7.1.00.0060.02619.10
7.0.330.0040.01115.30
7.0.320.0030.00915.25
7.0.310.0160.00015.33
7.0.300.0090.00615.18
7.0.290.0070.00315.30
7.0.280.0100.00315.39
7.0.270.0040.00715.15
7.0.260.0070.00715.34
7.0.250.0100.00315.54
7.0.240.0070.01015.28
7.0.230.0060.00915.50
7.0.220.0030.00915.45
7.0.210.0000.00915.42
7.0.200.0050.00915.99
7.0.190.0070.00415.39
7.0.180.0050.00315.27
7.0.170.0060.00615.14
7.0.160.0030.00915.42
7.0.150.0000.00915.04
7.0.140.0020.04318.70
7.0.130.0070.00715.43
7.0.120.0060.03918.69
7.0.110.0060.00915.44
7.0.100.0070.00415.32
7.0.90.0090.00315.34
7.0.80.0070.01015.34
7.0.70.0070.00315.11
7.0.60.0050.04017.64
7.0.50.0030.04716.75
7.0.40.0110.03216.88
7.0.30.0100.02316.75
7.0.20.0080.03516.76
7.0.10.0030.03816.75
7.0.00.0100.04016.77
5.6.400.0060.01214.67
5.6.390.0000.01114.21
5.6.380.0130.00014.16
5.6.370.0070.00314.59
5.6.360.0070.00714.25
5.6.350.0070.01114.45
5.6.340.0060.00914.29
5.6.330.0070.00714.35
5.6.320.0060.00914.62
5.6.310.0030.00714.46
5.6.300.0030.01014.26
5.6.290.0040.00414.47
5.6.280.0050.04017.58
5.6.270.0060.00914.39
5.6.260.0040.00713.99
5.6.250.0030.00914.44
5.6.240.0060.00314.42
5.6.230.0170.00014.46
5.6.220.0060.00614.10
5.6.210.0070.02317.56
5.6.200.0080.04516.20
5.6.190.0100.04317.38
5.6.180.0100.04317.26
5.6.170.0030.02617.43
5.6.160.0080.03917.33
5.6.150.0030.04017.20
5.6.140.0080.04217.22
5.6.130.0120.04517.36
5.6.120.0100.04117.25
5.6.110.0030.04117.46
5.6.100.0030.04917.14
5.6.90.0050.04717.27
5.6.80.0050.03016.96
5.6.70.0050.02316.87
5.6.60.0110.03016.98
5.6.50.0080.03816.76
5.6.40.0080.03017.09
5.6.30.0090.02716.87
5.6.20.0090.02716.89
5.6.10.0050.02616.77
5.6.00.0070.04016.85
5.5.380.0100.00614.36
5.5.370.0070.00314.22
5.5.360.0040.01114.49
5.5.350.0140.04217.38
5.5.340.0080.04016.25
5.5.330.0030.04017.27
5.5.320.0050.03017.25
5.5.310.0030.03017.20
5.5.300.0090.02717.14
5.5.290.0030.03817.24
5.5.280.0070.02317.27
5.5.270.0070.03117.23
5.5.260.0050.02817.21
5.5.250.0070.03217.02
5.5.240.0090.03917.02
5.5.230.0050.03516.78
5.5.220.0190.03016.96
5.5.210.0050.04016.74
5.5.200.0070.04616.91
5.5.190.0080.03816.95
5.5.180.0030.03017.06
5.5.170.0140.00013.69
5.5.160.0080.04316.66
5.5.150.0050.04617.02
5.5.140.0110.02916.70
5.5.130.0030.04816.76
5.5.120.0080.04216.89
5.5.110.0080.03616.50
5.5.100.0070.02716.67
5.5.90.0050.02516.89
5.5.80.0080.02816.73
5.5.70.0060.04316.73
5.5.60.0070.02416.79
5.5.50.0080.04016.89
5.5.40.0050.03516.75
5.5.30.0070.03416.73
5.5.20.0070.04416.78
5.5.10.0070.04216.88
5.5.00.0030.04516.81
5.4.450.0040.04015.33
5.4.440.0020.02315.24
5.4.430.0060.03315.18
5.4.420.0080.04115.07
5.4.410.0080.04115.24
5.4.400.0000.02614.79
5.4.390.0030.02814.93
5.4.380.0030.04214.81
5.4.370.0070.02514.87
5.4.360.0070.05015.02
5.4.350.0170.03214.88
5.4.340.0040.03415.03
5.4.330.0100.00011.10
5.4.320.0080.02515.12
5.4.310.0080.03915.01
5.4.300.0100.02714.84
5.4.290.0030.02515.08
5.4.280.0070.02815.06
5.4.270.0050.02315.02
5.4.260.0050.02315.14
5.4.250.0070.03815.07
5.4.240.0100.03514.92
5.4.230.0050.03615.00
5.4.220.0040.02415.03
5.4.210.0120.03715.10
5.4.200.0040.02415.00
5.4.190.0080.03314.96
5.4.180.0050.03814.97
5.4.170.0030.02515.09
5.4.160.0030.02214.97
5.4.150.0050.02114.98
5.4.140.0080.03313.59
5.4.130.0080.02813.54
5.4.120.0080.03213.84
5.4.110.0050.03113.75
5.4.100.0050.04113.72
5.4.90.0050.04013.84
5.4.80.0100.01813.61
5.4.70.0030.03813.73
5.4.60.0000.03913.68
5.4.50.0050.02813.62
5.4.40.0070.03913.66
5.4.30.0050.02613.64
5.4.20.0070.03113.57
5.4.10.0020.03813.56
5.4.00.0050.02213.39
5.3.290.0040.02312.69
5.3.280.0050.04312.54
5.3.270.0080.03312.63
5.3.260.0000.02512.61
5.3.250.0020.02312.63
5.3.240.0030.03612.46
5.3.230.0040.04212.59
5.3.220.0070.02812.44
5.3.210.0050.02412.57
5.3.200.0060.04312.55
5.3.190.0070.03412.56
5.3.180.0030.04112.58
5.3.170.0030.02612.66
5.3.160.0050.02212.63
5.3.150.0070.04012.72
5.3.140.0060.04212.65
5.3.130.0070.03812.68
5.3.120.0020.02512.53
5.3.110.0020.02812.62
5.3.100.0050.04012.33
5.3.90.0020.04112.33
5.3.80.0090.03212.31
5.3.70.0100.02012.37
5.3.60.0000.02412.21
5.3.50.0070.03712.29
5.3.40.0030.02812.10
5.3.30.0030.02612.13
5.3.20.0070.02212.04
5.3.10.0050.02012.03
5.3.00.0080.03611.96
5.2.170.0070.06311.07
5.2.160.0000.04711.14
5.2.150.0070.05711.21
5.2.140.0070.06711.11
5.2.130.0070.06011.15
5.2.120.0030.05011.16
5.2.110.0030.03011.16
5.2.100.0030.05711.10
5.2.90.0000.06011.11
5.2.80.0030.06711.26
5.2.70.0130.04711.13
5.2.60.0100.05711.01
5.2.50.0100.05710.94
5.2.40.0130.05310.96
5.2.30.0000.06710.86
5.2.20.0030.05311.02
5.2.10.0030.04710.95
5.2.00.0100.05310.71
5.1.60.0100.0279.98
5.1.50.0030.05310.15
5.1.40.0100.0479.97
5.1.30.0070.04710.36
5.1.20.0030.05010.41
5.1.10.0100.05310.14
5.1.00.0030.04710.14
5.0.50.0030.0438.50
5.0.40.0070.0378.48
5.0.30.0070.0638.23
5.0.20.0030.0278.17
5.0.10.0070.0378.24
5.0.00.0070.0478.16
4.4.90.0000.0337.32
4.4.80.0030.0207.32
4.4.70.0000.0237.32
4.4.60.0000.0337.32
4.4.50.0000.0277.32
4.4.40.0070.0377.32
4.4.30.0030.0207.32
4.4.20.0030.0277.32
4.4.10.0000.0377.32
4.4.00.0000.0577.32
4.3.110.0000.0407.32
4.3.100.0030.0377.32
4.3.90.0030.0337.32
4.3.80.0030.0537.32
4.3.70.0000.0337.32
4.3.60.0030.0277.32
4.3.50.0000.0277.32
4.3.40.0000.0307.32
4.3.30.0070.0107.32
4.3.20.0000.0177.32
4.3.10.0000.0207.32
4.3.00.0000.0177.32

preferences:
59.02 ms | 400 KiB | 5 Q