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(); call_user_func($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.40.0070.00718.80
8.3.30.0060.00919.02
8.3.20.0060.00320.07
8.3.10.0040.00421.92
8.3.00.0030.00522.44
8.2.170.0110.01122.96
8.2.160.0150.00019.21
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0130.00626.16
8.2.120.0030.00519.66
8.2.110.0070.00420.92
8.2.100.0060.00517.66
8.2.90.0030.00618.92
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0000.00817.93
8.2.50.0080.00018.10
8.2.40.0000.00918.25
8.2.30.0040.00417.95
8.2.20.0080.00017.63
8.2.10.0030.00617.68
8.2.00.0070.00317.61
8.1.270.0040.00422.19
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00621.16
8.1.230.0060.00620.24
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0030.00617.38
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0030.00518.66
8.1.160.0000.00822.19
8.1.150.0000.00718.57
8.1.140.0070.00017.43
8.1.130.0000.00717.87
8.1.120.0040.00417.40
8.1.110.0040.00417.50
8.1.100.0000.00717.50
8.1.90.0050.00317.45
8.1.80.0050.00217.43
8.1.70.0000.00717.42
8.1.60.0040.00417.51
8.1.50.0030.00517.45
8.1.40.0040.00417.52
8.1.30.0050.00317.70
8.1.20.0030.00517.64
8.1.10.0060.00317.49
8.1.00.0060.00317.52
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00818.35
8.0.270.0000.00817.12
8.0.260.0070.00016.82
8.0.250.0030.00316.91
8.0.240.0040.00416.82
8.0.230.0000.00716.86
8.0.220.0030.00316.74
8.0.210.0070.00016.73
8.0.200.0030.00316.92
8.0.190.0000.00716.84
8.0.180.0040.00416.95
8.0.170.0050.00216.93
8.0.160.0080.00016.78
8.0.150.0030.00516.79
8.0.140.0050.00316.84
8.0.130.0060.00313.30
8.0.120.0040.00416.74
8.0.110.0000.00716.88
8.0.100.0040.00416.76
8.0.90.0040.00416.89
8.0.80.0070.00716.77
8.0.70.0000.00716.77
8.0.60.0000.00816.71
8.0.50.0040.00416.88
8.0.30.0070.01317.11
8.0.20.0150.00317.40
8.0.10.0000.00716.96
8.0.00.0120.00516.71
7.4.330.0000.00515.00
7.4.320.0000.00616.43
7.4.300.0030.00316.57
7.4.290.0030.00316.45
7.4.280.0040.00416.42
7.4.270.0070.00016.61
7.4.260.0030.00316.58
7.4.250.0080.00016.36
7.4.240.0050.00216.52
7.4.230.0070.00016.54
7.4.220.0110.00416.71
7.4.210.0100.00816.65
7.4.200.0000.00716.47
7.4.190.0030.00316.41
7.4.160.0120.00916.53
7.4.150.0070.01017.40
7.4.140.0130.00517.86
7.4.130.0130.00716.50
7.4.120.0060.01116.60
7.4.110.0200.00416.44
7.4.100.0090.00916.51
7.4.90.0090.01216.68
7.4.80.0110.01119.39
7.4.70.0060.01216.35
7.4.60.0030.01416.51
7.4.50.0040.00416.17
7.4.40.0040.01522.77
7.4.30.0090.00616.53
7.4.00.0070.01114.88
7.3.330.0000.00513.21
7.3.320.0050.00013.15
7.3.310.0000.00716.31
7.3.300.0030.00316.17
7.3.290.0040.01116.26
7.3.280.0090.00816.33
7.3.270.0030.01417.40
7.3.260.0070.01016.21
7.3.250.0150.00616.31
7.3.240.0120.00416.58
7.3.230.0190.00316.41
7.3.210.0140.00516.48
7.3.200.0120.00419.39
7.3.190.0050.01816.45
7.3.180.0030.01316.34
7.3.170.0060.00916.42
7.3.160.0090.00916.32
7.3.120.0040.01115.12
7.2.330.0070.01016.64
7.2.320.0150.00316.66
7.2.310.0050.01116.41
7.2.300.0100.00716.61
7.2.290.0030.01316.85
7.2.00.0000.01019.54
7.1.100.0100.01315.81
7.1.70.0040.00416.85
7.1.60.0080.00417.19
7.1.50.0060.00617.02
7.1.00.0000.04322.36
7.0.200.0100.01316.81
7.0.140.0030.07722.21
7.0.60.0100.06319.91
7.0.50.0130.07717.88
7.0.40.0100.06720.24
7.0.30.0330.07320.08
7.0.20.0230.04020.25
7.0.10.0330.05020.16
7.0.00.0100.03720.29
5.6.280.0030.07320.82
5.6.210.0070.08020.49
5.6.200.0130.08018.18
5.6.190.0130.06720.42
5.6.180.4200.04320.68
5.6.170.0330.04720.57
5.6.160.0000.04320.48
5.6.150.0070.08318.12
5.6.140.0070.05018.17
5.6.130.0030.08718.24
5.6.120.0130.05321.05
5.6.110.0170.06721.02
5.6.100.0100.06720.90
5.6.90.0070.08721.11
5.6.80.0130.07320.40
5.6.70.0070.03720.54
5.5.350.0070.08320.36
5.5.340.0100.07318.09
5.5.330.0130.08020.38
5.5.320.0370.03720.42
5.5.310.0230.08320.39
5.5.300.0070.03717.98
5.5.290.0030.08018.01
5.5.280.0200.06020.75
5.5.270.0170.08020.74
5.5.260.0000.09020.73
5.5.250.0030.04320.67
5.5.240.0170.07320.09
5.4.450.0730.07019.48
5.4.440.0700.05319.49
5.4.430.0630.06319.66
5.4.420.0170.04719.30
5.4.410.0170.05719.18
5.4.400.0470.04018.87
5.4.390.0370.06318.79
5.4.380.0330.05018.77
5.4.370.0070.06018.81
5.4.360.0130.05018.74
5.4.350.0200.04718.78
5.4.340.0100.05318.74
5.4.320.0030.03912.51
5.4.310.0050.03712.50
5.4.300.0100.03212.51
5.4.290.0060.03712.51
5.4.280.0080.03212.40
5.4.270.0050.03612.40
5.4.260.0100.04718.97
5.4.250.0100.05018.74
5.4.240.0000.06019.09
5.4.230.0100.06018.95
5.4.220.0100.05319.09
5.4.210.0030.06318.95
5.4.200.0100.05718.95
5.4.190.0070.05718.93
5.4.180.0100.04718.95
5.4.170.0000.06018.66
5.4.160.0130.04319.04
5.4.150.0170.04318.75
5.4.140.0070.05016.48
5.4.130.0130.06316.56
5.4.120.0070.04716.43
5.4.110.0070.05316.62
5.4.100.0100.04316.54
5.4.90.0200.04016.54
5.4.80.0130.06316.46
5.4.70.0000.05716.55
5.4.60.0130.07016.36
5.4.50.0130.07716.52
5.4.40.0070.05016.51
5.4.30.0100.04716.46
5.4.20.0100.04316.62
5.4.10.0100.05316.35
5.4.00.0200.04715.92
5.3.290.0060.05112.80
5.3.280.0030.05314.69
5.3.270.0070.05314.70
5.3.260.0030.05714.45
5.3.250.0070.05314.61
5.3.240.0100.04714.75
5.3.230.0130.04314.63
5.3.220.0070.05014.58
5.3.210.0100.06314.41
5.3.200.0170.05014.58
5.3.190.0100.04714.41
5.3.180.0000.05714.59
5.3.170.0070.05314.66
5.3.160.0230.06314.80
5.3.150.0130.07014.80
5.3.140.0100.04714.63
5.3.130.0100.05014.46
5.3.120.0070.05314.53
5.3.110.0170.04714.55
5.3.100.0070.05014.26
5.3.90.0030.05314.10
5.3.80.0100.04713.86
5.3.70.0070.05014.21
5.3.60.0030.05313.97
5.3.50.0030.05313.79
5.3.40.0070.05014.14
5.3.30.0030.05314.01
5.3.20.0070.05013.70
5.3.10.0100.06013.65
5.3.00.0070.05013.63
5.2.170.0030.04311.24
5.2.160.0100.04711.14
5.2.150.0030.04011.22
5.2.140.0100.03711.22
5.2.130.0030.04011.28
5.2.120.0100.03711.10
5.2.110.0030.04311.09
5.2.100.0100.03311.18
5.2.90.0200.03311.16
5.2.80.0100.03711.28
5.2.70.0070.05011.17
5.2.60.0100.03711.12
5.2.50.0100.04011.20
5.2.40.0030.04010.97
5.2.30.0000.04310.95
5.2.20.0170.04311.17
5.2.10.0070.03711.02
5.2.00.0030.04310.72
5.1.60.0000.04010.23
5.1.50.0030.03310.00
5.1.40.0000.0379.89
5.1.30.0000.03710.55
5.1.20.0100.03010.43
5.1.10.0000.03710.11
5.1.00.0070.03010.07
5.0.50.0100.0238.38
5.0.40.0070.0238.38
5.0.30.0000.0438.18
5.0.20.0070.0238.39
5.0.10.0030.0278.12
5.0.00.0070.0408.13
4.4.90.0070.0176.55
4.4.80.0000.0236.23
4.4.70.0000.0236.22
4.4.60.0030.0206.22
4.4.50.0000.0336.22
4.4.40.0030.0306.18
4.4.30.0030.0206.18
4.4.20.0000.0236.18
4.4.10.0100.0176.18
4.4.00.0000.0406.18
4.3.110.0030.0206.18
4.3.100.0030.0306.18
4.3.90.0030.0206.18
4.3.80.0000.0376.18
4.3.70.0030.0236.18
4.3.60.0030.0206.18
4.3.50.0000.0236.18
4.3.40.0000.0376.18
4.3.30.0030.0206.18
4.3.20.0030.0206.18
4.3.10.0000.0206.18
4.3.00.0000.0237.07

preferences:
45.4 ms | 400 KiB | 5 Q