3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $hello; public function __construct() { $this->hello = function(){ echo 'hello from callable'; }; } public function hello() { echo 'hello from object'; } public function __call($method, $args) { if(is_callable(array($this, $method))) { return call_user_func_array($this->$method, $args); } } } $foo = new Foo(); $foo->hello();

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.0170.00318.43
8.3.50.0040.01121.15
8.3.40.0000.01418.79
8.3.30.0120.00619.05
8.3.20.0080.00020.34
8.3.10.0000.00821.92
8.3.00.0080.00022.20
8.2.180.0100.00316.50
8.2.170.0040.01122.96
8.2.160.0120.00619.01
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0040.01126.16
8.2.120.0070.00019.66
8.2.110.0060.00321.19
8.2.100.0160.00017.78
8.2.90.0040.00419.06
8.2.80.0030.00517.97
8.2.70.0060.00317.50
8.2.60.0040.00417.80
8.2.50.0000.00818.10
8.2.40.0030.00718.22
8.2.30.0000.00718.07
8.2.20.0000.00717.65
8.2.10.0040.00417.64
8.2.00.0070.00317.68
8.1.280.0090.00925.92
8.1.270.0050.00323.99
8.1.260.0020.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00622.68
8.1.230.0080.00320.42
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0000.00917.35
8.1.190.0000.00817.25
8.1.180.0050.00318.10
8.1.170.0050.00318.62
8.1.160.0070.00022.18
8.1.150.0000.00718.55
8.1.140.0060.00317.36
8.1.130.0000.00717.82
8.1.120.0030.00317.36
8.1.110.0080.00017.42
8.1.100.0050.00217.44
8.1.90.0040.00417.43
8.1.80.0000.00717.43
8.1.70.0070.00017.46
8.1.60.0090.00017.55
8.1.50.0050.00217.50
8.1.40.0040.00417.55
8.1.30.0040.00417.59
8.1.20.0000.00817.70
8.1.10.0050.00217.61
8.1.00.0030.00517.46
8.0.300.0040.00318.77
8.0.290.0040.00416.63
8.0.280.0000.00718.43
8.0.270.0000.00817.19
8.0.260.0000.00716.88
8.0.250.0000.00716.89
8.0.240.0030.00516.89
8.0.230.0070.00016.79
8.0.220.0050.00316.81
8.0.210.0030.00316.80
8.0.200.0030.00316.98
8.0.190.0040.00416.87
8.0.180.0030.00316.93
8.0.170.0000.00716.95
8.0.160.0020.00516.77
8.0.150.0050.00316.89
8.0.140.0000.00816.86
8.0.130.0060.00313.27
8.0.120.0020.00516.75
8.0.110.0020.00516.84
8.0.100.0040.00416.90
8.0.90.0030.00316.77
8.0.80.0000.01516.83
8.0.70.0040.00416.71
8.0.60.0090.00016.75
8.0.50.0040.00416.91
8.0.30.0100.00916.84
8.0.20.0100.01017.40
8.0.10.0050.00316.89
8.0.00.0110.00916.59
7.4.330.0000.00415.06
7.4.320.0060.00016.48
7.4.300.0030.00316.60
7.4.290.0030.00316.48
7.4.280.0000.00716.39
7.4.270.0000.00716.61
7.4.260.0000.00716.55
7.4.250.0030.00516.47
7.4.240.0010.00616.47
7.4.230.0030.00316.34
7.4.220.0070.01116.64
7.4.210.0040.01016.49
7.4.200.0070.00016.62
7.4.190.0000.00716.40
7.4.160.0170.00316.37
7.4.150.0030.01317.40
7.4.140.0090.01017.86
7.4.130.0140.00716.59
7.4.120.0080.00816.51
7.4.110.0120.01216.59
7.4.100.0180.00616.31
7.4.90.0120.00916.44
7.4.80.0110.01119.39
7.4.70.0110.00516.48
7.4.60.0060.01116.53
7.4.50.0050.00316.35
7.4.40.0040.00822.77
7.4.30.0110.00516.52
7.4.00.0060.00614.96
7.3.330.0000.00513.30
7.3.320.0000.00613.22
7.3.310.0030.00316.31
7.3.300.0030.00316.16
7.3.290.0080.00616.30
7.3.280.0060.01116.32
7.3.270.0120.00617.40
7.3.260.0150.00316.21
7.3.250.0070.01016.36
7.3.240.0140.00316.34
7.3.230.0030.01316.49
7.3.210.0040.01216.57
7.3.200.0070.00919.39
7.3.190.0110.00716.30
7.3.180.0070.01116.54
7.3.170.0060.01516.46
7.3.160.0100.00616.31
7.3.120.0030.01414.73
7.2.330.0070.01016.62
7.2.320.0130.00316.38
7.2.310.0140.00316.81
7.2.300.0070.01016.82
7.2.290.0120.00316.63
7.1.70.0070.00016.97
7.1.60.0110.01119.82
7.1.50.0080.01516.58
7.1.00.0000.06322.37
7.0.200.0040.00416.66
7.0.140.0070.06721.93
7.0.60.0100.08019.92
7.0.50.0130.06717.84
7.0.40.0100.04020.24
7.0.30.0230.05320.20
7.0.20.0370.07020.23
7.0.10.0200.06320.05
7.0.00.0070.04020.16
5.6.280.0070.07020.83
5.6.210.0070.08320.61
5.6.200.0000.07018.13
5.6.190.0030.09020.59
5.6.180.3200.04020.57
5.6.170.0200.06020.45
5.6.160.0030.04720.50
5.6.150.0070.04318.27
5.6.140.0070.05318.15
5.6.130.0070.03718.30
5.6.120.0130.06021.00
5.6.110.0170.07721.03
5.6.100.0130.08321.00
5.6.90.0100.08021.04
5.6.80.0070.04020.46
5.6.70.0070.04320.29
5.5.350.0100.05720.48
5.5.340.0070.08318.04
5.5.330.0000.08320.40
5.5.320.0200.08320.35
5.5.310.0270.08020.51
5.5.300.0070.03717.98
5.5.290.0000.08718.05
5.5.280.0030.04720.78
5.5.270.0170.07020.89
5.5.260.0070.06020.77
5.5.250.0070.04320.68
5.5.240.0130.06020.14
5.4.450.0600.06319.36
5.4.440.0830.05319.48
5.4.430.0170.06319.55
5.4.420.0270.04719.36
5.4.410.0600.06019.54
5.4.400.0400.04718.49
5.4.390.0530.07018.74
5.4.380.0200.05718.74
5.4.370.0170.05018.50
5.4.360.0200.04718.79
5.4.350.0130.05318.51
5.4.340.0170.05018.76
5.4.320.0080.04312.51
5.4.310.0090.03812.51
5.4.300.0040.03912.51
5.4.290.0080.04412.50
5.4.280.0070.03512.40
5.4.270.0090.04212.40
5.4.260.0170.06018.89
5.4.250.0130.06018.89
5.4.240.0030.05718.93
5.4.230.0030.06718.92
5.4.220.0130.06018.76
5.4.210.0130.07018.79
5.4.200.0170.05319.04
5.4.190.0130.06018.95
5.4.180.0000.05318.91
5.4.170.0200.04018.74
5.4.160.0070.05018.97
5.4.150.0000.06019.03
5.4.140.0130.04716.36
5.4.130.0200.03716.44
5.4.120.0170.04016.60
5.4.110.0070.05016.53
5.4.100.0070.05016.42
5.4.90.0100.04316.53
5.4.80.0100.04716.48
5.4.70.0070.05016.41
5.4.60.0170.04016.46
5.4.50.0030.05716.43
5.4.40.0030.05016.56
5.4.30.0070.05016.44
5.4.20.0070.04716.30
5.4.10.0130.04316.29
5.4.00.0030.07016.04
5.3.290.0070.04212.80
5.3.280.0130.05314.74
5.3.270.0070.05014.62
5.3.260.0130.06714.78
5.3.250.0000.05714.70
5.3.240.0070.05314.62
5.3.230.0170.04014.58
5.3.220.0070.05014.74
5.3.210.0130.04714.56
5.3.200.0070.05014.57
5.3.190.0100.05014.57
5.3.180.0100.05014.41
5.3.170.0070.05314.59
5.3.160.0130.04314.40
5.3.150.0030.05314.70
5.3.140.0030.05014.65
5.3.130.0070.05314.64
5.3.120.0030.05314.64
5.3.110.0100.07714.70
5.3.100.0170.04014.22
5.3.90.0100.04714.11
5.3.80.0000.05714.08
5.3.70.0030.05014.21
5.3.60.0100.04714.16
5.3.50.0030.05014.05
5.3.40.0070.05013.79
5.3.30.0070.05014.09
5.3.20.0030.05013.77
5.3.10.0130.04013.67
5.3.00.0130.04713.72
5.2.170.0070.04011.27
5.2.160.0100.03311.05
5.2.150.0030.04011.32
5.2.140.0130.03011.23
5.2.130.0100.03711.17
5.2.120.0030.06011.18
5.2.110.0100.03711.05
5.2.100.0100.03311.26
5.2.90.0130.05311.18
5.2.80.0070.04011.09
5.2.70.0130.03311.09
5.2.60.0030.04311.23
5.2.50.0070.04011.10
5.2.40.0030.04011.17
5.2.30.0130.03311.05
5.2.20.0030.04011.04
5.2.10.0030.03711.04
5.2.00.0070.05710.57
5.1.60.0030.03310.15
5.1.50.0000.0379.83
5.1.40.0130.02710.18
5.1.30.0070.03310.28
5.1.20.0070.03310.54
5.1.10.0030.03710.21
5.1.00.0030.03310.03
5.0.50.0030.0308.52
5.0.40.0030.0278.64
5.0.30.0000.0438.19
5.0.20.0100.0208.25
5.0.10.0030.0278.12
5.0.00.0000.0438.20
4.4.90.0030.0306.87
4.4.80.0030.0206.87
4.4.70.0070.0176.87
4.4.60.0030.0206.87
4.4.50.0000.0236.87
4.4.40.0000.0336.87
4.4.30.0000.0276.87
4.4.20.0030.0206.87
4.4.10.0000.0236.87
4.4.00.0030.0306.87
4.3.110.0000.0236.87
4.3.100.0030.0206.87
4.3.90.0000.0236.87
4.3.80.0000.0336.87
4.3.70.0030.0206.87
4.3.60.0100.0236.87
4.3.50.0030.0206.87
4.3.40.0000.0336.87
4.3.30.0000.0236.87
4.3.20.0000.0236.87
4.3.10.0030.0206.87
4.3.00.0000.0237.07

preferences:
49.67 ms | 401 KiB | 5 Q