3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public function foo() { return 1; } public function get($context) { $f = function() { 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.60.0110.00816.50
8.3.50.0190.00816.37
8.3.40.0040.01218.74
8.3.30.0150.00718.67
8.3.20.0100.01018.73
8.3.10.0110.00720.71
8.3.00.0000.01919.36
8.2.180.0070.01416.63
8.2.170.0130.00622.96
8.2.160.0070.00721.20
8.2.150.0030.00724.18
8.2.140.0080.00024.66
8.2.130.0140.00026.16
8.2.120.0060.00319.48
8.2.110.0030.00620.35
8.2.100.0030.00817.91
8.2.90.0030.00519.28
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0000.00818.04
8.2.50.0060.00319.35
8.2.40.0080.00018.16
8.2.30.0040.00417.95
8.2.20.0070.00017.66
8.2.10.0030.00517.69
8.2.00.0000.00817.69
8.1.280.0100.00325.92
8.1.270.0070.00024.66
8.1.260.0190.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.92
8.1.230.0040.00817.45
8.1.220.0040.00417.74
8.1.210.0070.00318.77
8.1.200.0030.00717.48
8.1.190.0040.00417.39
8.1.180.0030.00518.10
8.1.170.0000.00718.82
8.1.160.0030.00518.89
8.1.150.0070.00018.68
8.1.140.0040.00417.52
8.1.130.0000.00817.83
8.1.120.0040.00417.52
8.1.110.0030.00517.47
8.1.100.0040.00417.51
8.1.90.0050.00317.45
8.1.80.0000.00717.36
8.1.70.0030.00317.37
8.1.60.0080.00017.60
8.1.50.0000.00817.37
8.1.40.0020.00517.44
8.1.30.0080.00017.58
8.1.20.0000.00717.63
8.1.10.0000.00817.54
8.1.00.0050.00617.35
8.0.300.0000.00818.77
8.0.290.0040.00416.58
8.0.280.0000.00718.23
8.0.270.0030.00516.70
8.0.260.0040.00416.71
8.0.250.0000.00716.80
8.0.240.0000.00716.77
8.0.230.0040.00316.77
8.0.220.0000.00716.80
8.0.210.0030.00516.85
8.0.200.0030.00316.79
8.0.190.0030.00416.81
8.0.180.0110.00016.83
8.0.170.0000.00916.84
8.0.160.0070.00016.79
8.0.150.0030.00616.86
8.0.140.0100.00016.84
8.0.130.0000.00613.35
8.0.120.0000.00816.84
8.0.110.0000.00816.88
8.0.100.0050.00316.88
8.0.90.0000.00716.89
8.0.80.0120.00316.81
8.0.70.0040.00416.90
8.0.60.0030.00516.84
8.0.50.0040.00416.76
8.0.30.0110.00817.20
8.0.20.0110.00816.93
8.0.10.0040.00417.13
8.0.00.0090.00916.75
7.4.330.0000.00512.98
7.4.320.0030.00316.55
7.4.300.0040.00416.46
7.4.290.0000.00716.35
7.4.280.0000.00716.46
7.4.270.0000.00716.58
7.4.260.0030.00313.28
7.4.250.0080.00016.48
7.4.240.0030.00316.53
7.4.230.0070.00016.69
7.4.220.0130.00716.48
7.4.210.0120.00416.54
7.4.200.0030.00316.38
7.4.190.0080.00016.32
7.4.160.0080.00816.61
7.4.150.0100.01316.65
7.4.140.0100.00816.62
7.4.130.0060.01316.44
7.4.120.0070.01016.54
7.4.110.0070.01616.37
7.4.100.0030.01416.64
7.4.90.0150.00316.56
7.4.80.0070.01419.39
7.4.70.0070.01316.64
7.4.60.0110.00816.58
7.4.50.0050.00216.33
7.4.40.0030.01416.31
7.4.30.0220.00316.65
7.4.00.0070.01014.86
7.3.330.0000.00613.12
7.3.320.0030.00313.30
7.3.310.0000.00716.22
7.3.300.0040.00416.30
7.3.290.0000.01616.32
7.3.280.0080.00816.30
7.3.270.0090.00916.52
7.3.260.0170.00016.28
7.3.250.0050.01416.32
7.3.240.0090.00916.37
7.3.230.0030.01416.52
7.3.210.0000.01616.47
7.3.200.0110.00716.22
7.3.190.0130.01016.48
7.3.180.0130.00316.48
7.3.170.0120.00416.25
7.3.160.0120.00316.52
7.3.120.0080.00814.91
7.2.330.0030.01416.68
7.2.320.0090.00916.78
7.2.310.0030.02116.59
7.2.300.0130.00316.65
7.2.290.0050.01116.62
7.2.60.0100.00316.69
7.2.00.0070.00719.47
7.1.200.0080.00315.71
7.1.100.0040.00818.07
7.1.70.0030.00616.96
7.1.60.0140.01019.40
7.1.50.0130.00716.63
7.1.00.0000.07322.42
7.0.200.0030.00316.91
7.0.140.0070.07022.18
7.0.120.0100.06721.96
7.0.60.0000.08319.96
7.0.50.0030.09017.88
7.0.40.0070.06020.27
7.0.30.0230.04720.06
7.0.20.0230.04020.07
7.0.10.0270.05720.16
7.0.00.0170.06320.09
5.6.280.0000.08020.91
5.6.210.0200.06720.72
5.6.200.0030.08718.18
5.6.190.0070.07020.63
5.6.180.0270.04720.64
5.6.170.0200.08320.55
5.6.160.0130.07720.61
5.6.150.0070.08018.21
5.6.140.0030.05018.21
5.6.130.0000.04718.29
5.6.120.0100.04720.98
5.6.110.0170.07721.03
5.6.100.0070.08320.99
5.6.90.0100.08720.99
5.6.80.0070.08020.54
5.6.70.4030.04720.36
5.5.350.0400.07020.44
5.5.340.0170.04717.98
5.5.330.0100.08720.21
5.5.320.0030.05720.40
5.5.310.0430.06320.32
5.5.300.0070.04318.08
5.5.290.0100.08317.98
5.5.280.0170.06020.78
5.5.270.0070.06020.69
5.5.260.0100.08020.75
5.5.250.0000.04720.68
5.5.240.0070.07320.08
5.4.450.0100.05719.41
5.4.440.0030.08019.18
5.4.430.0100.08019.37
5.4.420.0030.08319.46
5.4.410.0070.04319.27
5.4.400.0100.07319.16
5.4.390.0100.03719.00
5.4.380.0100.07319.20
5.4.370.0030.04319.14
5.4.360.0100.07319.24
5.4.350.0170.07018.85
5.4.340.0030.08018.98
5.4.320.0000.07019.14
5.4.310.0070.08019.14
5.4.300.0100.04318.85
5.4.290.0070.04318.85
5.4.280.0070.05319.11
5.4.270.0070.07019.14
5.4.260.0000.08318.85
5.4.250.0030.04319.25
5.4.240.0100.06319.14
5.4.230.0200.07319.11
5.4.220.0070.07319.07
5.4.210.0070.07319.15
5.4.200.0130.06719.07
5.4.190.0070.07319.13
5.4.180.0070.07718.99
5.4.170.0130.07318.91
5.4.160.0130.07019.23
5.4.150.0000.06719.13
5.4.140.0130.04716.55
5.4.130.0000.07716.50
5.4.120.0070.05716.45
5.4.110.0130.04716.48
5.4.100.0100.05016.36
5.4.90.0030.07316.46
5.4.80.0100.07016.37
5.4.70.0070.06716.49
5.4.60.0100.06316.57
5.4.50.0070.06316.36
5.4.40.0070.06716.31
5.4.30.0030.04016.34
5.4.20.0030.07016.30
5.4.10.0000.04016.30
5.4.00.0070.03315.84
5.3.290.0070.03714.59
5.3.280.0100.07314.77
5.3.270.0100.03314.63
5.3.260.0070.06314.61
5.3.250.0070.04714.64
5.3.240.0000.08014.63
5.3.230.0070.04714.52
5.3.220.0030.07714.60
5.3.210.0100.04014.57
5.3.200.0070.04314.59
5.3.190.0000.05314.73
5.3.180.0130.03014.53
5.3.170.0070.07714.56
5.3.160.0070.07014.45
5.3.150.0070.04014.71
5.3.140.0070.05014.55
5.3.130.0170.06314.57
5.3.120.0030.06714.44
5.3.110.0130.04014.55
5.3.100.0030.03713.96
5.3.90.0070.03313.93
5.3.80.0030.03713.98
5.3.70.0070.03313.98
5.3.60.0070.03313.90
5.3.50.0100.03014.01
5.3.40.0030.03313.96
5.3.30.0070.03313.97
5.3.20.0000.04013.75
5.3.10.0000.03713.75
5.3.00.0000.03713.72
5.2.170.0000.03011.05
5.2.160.0070.02711.16
5.2.150.0000.03011.22
5.2.140.0000.03311.15
5.2.130.0070.02311.07
5.2.120.0100.02711.16
5.2.110.0000.03711.07
5.2.100.0030.02711.07
5.2.90.0030.02711.14
5.2.80.0070.02311.17
5.2.70.0000.03011.05
5.2.60.0000.03011.11
5.2.50.0030.03010.99
5.2.40.0000.03011.05
5.2.30.0000.03011.03
5.2.20.0000.03010.85
5.2.10.0030.03010.94
5.2.00.0030.03310.68
5.1.60.0000.02310.05
5.1.50.0030.0239.95
5.1.40.0030.0239.89
5.1.30.0000.02710.39
5.1.20.0030.02310.35
5.1.10.0070.02010.06
5.1.00.0030.02310.13
5.0.50.0000.0238.52
5.0.40.0000.0208.51
5.0.30.0000.0308.51
5.0.20.0000.0238.51
5.0.10.0030.0208.51
5.0.00.0000.0308.51
4.4.90.0030.0138.51
4.4.80.0000.0138.51
4.4.70.0000.0178.51
4.4.60.0030.0138.51
4.4.50.0000.0178.51
4.4.40.0030.0238.51
4.4.30.0000.0178.51
4.4.20.0000.0178.51
4.4.10.0000.0178.51
4.4.00.0030.0238.51
4.3.110.0000.0178.51
4.3.100.0030.0138.51
4.3.90.0030.0138.51
4.3.80.0000.0238.51
4.3.70.0000.0138.51
4.3.60.0000.0138.51
4.3.50.0030.0108.51
4.3.40.0000.0238.51
4.3.30.0000.0138.51
4.3.20.0030.0108.51
4.3.10.0000.0138.51
4.3.00.0030.0178.51

preferences:
50.86 ms | 401 KiB | 5 Q