3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $secret = 'Nyy lbhe Onfr ner orybat gb hf.'; private $callback; final public function run() { call_user_func($this->callback); return $this->secret . PHP_EOL; } public function __set($k, $v) { $key = $v[($v[$v])]; // $v is some kind of weird array echo $key;exit; $value = $v(); // and a callback! $this->{$key} = $value; } } $test = new Test; // start $closure = function(){ }; $closure->bindTo($test); $test->secret = 1; // end editing here echo $test->run();

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.70.0040.01116.75
8.3.60.0120.00318.81
8.3.50.0100.00822.17
8.3.40.0070.00719.11
8.3.30.0000.01419.22
8.3.20.0040.00420.35
8.3.10.0000.00822.09
8.3.00.0060.00322.16
8.2.190.0110.01117.00
8.2.180.0110.00716.50
8.2.170.0000.01522.96
8.2.160.0160.00420.35
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0140.00326.16
8.2.120.0050.00317.75
8.2.110.0060.00321.88
8.2.100.0120.00019.63
8.2.90.0070.00319.20
8.2.80.0050.00317.97
8.2.70.0090.00017.63
8.2.60.0100.00017.93
8.2.50.0030.00518.07
8.2.40.0040.00418.28
8.2.30.0050.00218.13
8.2.20.0000.00817.80
8.2.10.0000.00717.76
8.2.00.0050.00217.80
8.1.280.0100.00325.92
8.1.270.0070.00322.17
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00623.62
8.1.230.0070.00419.08
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0050.00217.41
8.1.180.0080.00018.10
8.1.170.0000.00818.59
8.1.160.0030.00521.89
8.1.150.0040.00418.64
8.1.140.0000.00717.46
8.1.130.0000.00717.88
8.1.120.0040.00417.47
8.1.110.0030.00617.38
8.1.100.0050.00317.49
8.1.90.0040.00417.35
8.1.80.0040.00417.39
8.1.70.0080.00017.46
8.1.60.0030.00617.62
8.1.50.0000.00817.35
8.1.40.0020.00517.56
8.1.30.0000.00817.59
8.1.20.0000.00917.57
8.1.10.0020.00517.50
8.1.00.0040.00417.58
8.0.300.0040.00418.77
8.0.290.0060.00316.93
8.0.280.0030.00318.45
8.0.270.0040.00417.34
8.0.260.0030.00616.99
8.0.250.0000.00717.00
8.0.240.0040.00416.95
8.0.230.0040.00416.95
8.0.220.0070.00016.93
8.0.210.0070.00016.95
8.0.200.0040.00416.90
8.0.190.0030.00317.05
8.0.180.0000.00716.91
8.0.170.0040.00416.92
8.0.160.0000.00716.88
8.0.150.0080.00016.90
8.0.140.0040.00416.87
8.0.130.0050.00013.34
8.0.120.0030.00616.79
8.0.110.0040.00416.93
8.0.100.0080.00016.84
8.0.90.0030.00317.07
8.0.80.0030.01216.93
8.0.70.0000.00716.79
8.0.60.0040.00416.83
8.0.50.0040.00416.84
8.0.30.0090.01117.06
8.0.20.0170.00617.40
8.0.10.0040.00417.13
8.0.00.0080.01216.84
7.4.330.0020.00215.09
7.4.320.0000.00616.51
7.4.300.0060.00016.65
7.4.290.0000.00716.62
7.4.280.0030.00316.60
7.4.270.0030.00316.55
7.4.260.0000.00716.49
7.4.250.0000.00716.47
7.4.240.0020.00516.57
7.4.230.0030.00316.30
7.4.220.0030.01316.57
7.4.210.0080.00816.52
7.4.200.0000.00716.49
7.4.190.0030.00316.66
7.4.160.0100.00616.63
7.4.150.0180.00917.40
7.4.140.0090.01017.86
7.4.130.0110.00616.63
7.4.120.0060.01216.62
7.4.110.0090.01016.54
7.4.100.0090.01516.43
7.4.90.0100.00716.57
7.4.80.0160.00619.39
7.4.70.0060.01316.52
7.4.60.0090.00916.53
7.4.50.0000.00516.49
7.4.40.0070.01022.77
7.4.30.0160.00316.50
7.4.00.0090.00615.04
7.3.330.0000.00513.45
7.3.320.0000.00513.36
7.3.310.0040.00416.23
7.3.300.0070.00016.32
7.3.290.0090.00916.26
7.3.280.0130.00416.35
7.3.270.0080.01217.40
7.3.260.0030.01416.40
7.3.250.0100.01016.41
7.3.240.0140.00716.64
7.3.230.0140.00416.39
7.3.210.0140.00316.31
7.3.200.0140.00719.39
7.3.190.0060.01516.35
7.3.180.0100.00716.39
7.3.170.0100.00616.53
7.3.160.0120.00316.43
7.3.120.0090.00914.64
7.2.330.0130.00416.67
7.2.320.0000.02316.64
7.2.310.0090.00616.45
7.2.300.0130.00316.95
7.2.290.0060.01016.59
7.1.70.0030.01016.98
7.1.60.0100.01019.82
7.1.50.0040.01816.57
7.1.00.0100.07022.41
7.0.200.0050.00516.64
7.0.140.0000.07721.95
7.0.60.0070.07019.92
7.0.50.0000.05317.82
7.0.40.0100.06720.13
7.0.30.0270.04720.21
7.0.20.0270.05320.06
7.0.10.0170.04720.11
7.0.00.0170.07720.26
5.6.280.0030.07321.00
5.6.210.0170.06720.67
5.6.200.0030.04318.18
5.6.190.0170.07320.78
5.6.180.0170.04720.39
5.6.170.0430.05320.45
5.6.160.0130.08320.47
5.6.150.0100.08018.21
5.6.140.0100.03318.15
5.6.130.0000.04318.29
5.6.120.0070.08321.02
5.6.110.0070.07721.05
5.6.100.0170.07720.97
5.6.90.0030.04321.00
5.6.80.0170.07020.36
5.6.70.0200.08720.38
5.5.350.0230.04020.45
5.5.340.0070.07717.97
5.5.330.0070.09020.47
5.5.320.0330.07020.21
5.5.310.0130.05320.38
5.5.300.0070.07318.07
5.5.290.0100.05018.08
5.5.280.0130.08020.81
5.5.270.0100.07320.95
5.5.260.0100.08020.88
5.5.250.0030.08720.44
5.5.240.0000.04020.27
5.4.450.0900.07019.59
5.4.440.0900.06719.61
5.4.430.0130.04719.38
5.4.420.0930.06319.54
5.4.410.0130.06319.03
5.4.400.1500.00018.77
5.4.390.1730.00018.75
5.4.380.0130.06318.62
5.4.370.0070.05718.74
5.4.360.0030.06718.59
5.4.350.0170.05318.51
5.4.340.0330.05018.75
5.4.320.0050.04012.51
5.4.310.0050.04112.50
5.4.300.0060.03812.51
5.4.290.0090.03612.50
5.4.280.0070.03412.40
5.4.270.0130.05318.94
5.4.260.0130.05719.04
5.4.250.0130.06018.93
5.4.240.0070.08018.99
5.4.230.0130.05318.74
5.4.220.0130.06718.79
5.4.210.0130.06718.99
5.4.200.0000.06318.64
5.4.190.0070.08018.93
5.4.180.0230.06719.09
5.4.170.0070.08719.01
5.4.160.0100.05018.94
5.4.150.0130.06018.82
5.4.140.0200.06316.42
5.4.130.0170.06016.44
5.4.120.0100.05016.41
5.4.110.0170.05316.41
5.4.100.0070.06316.52
5.4.90.0170.07016.56
5.4.80.0030.05716.31
5.4.70.0070.05016.39
5.4.60.0130.06716.54
5.4.50.0100.05316.64
5.4.40.0200.05016.53
5.4.30.0270.05316.45
5.4.20.0170.04316.35
5.4.10.0100.07016.29
5.4.00.0130.04315.97
5.3.290.0060.04012.80
5.3.280.0100.07014.51
5.3.270.0230.04014.61
5.3.260.0100.07314.70
5.3.250.0130.04714.83
5.3.240.0130.06014.62
5.3.230.0170.06014.67
5.3.220.0100.05014.77
5.3.210.0130.04714.41
5.3.200.0100.06014.80
5.3.190.0100.07014.48
5.3.180.0100.05714.56
5.3.170.0200.06014.67
5.3.160.0030.05714.58
5.3.150.0070.05014.56
5.3.140.0070.05314.55
5.3.130.0030.06014.78
5.3.120.0070.07314.78
5.3.110.0070.05714.78
5.3.100.0170.06014.11
5.3.90.0070.07313.85
5.3.80.0100.04714.00
5.3.70.0070.06313.99
5.3.60.0170.05014.16
5.3.50.0030.07014.04
5.3.40.0170.05713.86
5.3.30.0070.05314.00
5.3.20.0070.06713.68
5.3.10.0100.06713.73
5.3.00.0070.06713.55
5.2.170.0030.05011.13
5.2.160.0130.04711.36
5.2.150.0100.05311.10
5.2.140.0070.04011.13
5.2.130.0030.05311.19
5.2.120.0070.05311.18
5.2.110.0030.04311.19
5.2.100.0070.05710.93
5.2.90.0070.03711.01
5.2.80.0030.05011.08
5.2.70.0030.04311.17
5.2.60.0070.05311.03
5.2.50.0100.03711.01
5.2.40.0070.04010.90
5.2.30.0100.03310.96
5.2.20.0030.05311.14
5.2.10.0100.04710.70
5.2.00.0100.05010.90
5.1.60.0100.0339.95
5.1.50.0070.03310.15
5.1.40.0100.0439.96
5.1.30.0100.03010.32
5.1.20.0000.04710.54
5.1.10.0130.03010.12
5.1.00.0000.06010.17
5.0.50.0100.0338.70
5.0.40.0070.0378.51
5.0.30.0130.0338.19
5.0.20.0030.0308.20
5.0.10.0070.0238.37
5.0.00.0030.0408.16
4.4.90.0030.0206.66
4.4.80.0070.0276.66
4.4.70.0030.0236.66
4.4.60.0030.0206.66
4.4.50.0000.0236.66
4.4.40.0070.0306.66
4.4.30.0030.0236.66
4.4.20.0030.0306.66
4.4.10.0000.0276.66
4.4.00.0170.0306.66
4.3.110.0030.0236.66
4.3.100.0030.0236.66
4.3.90.0030.0306.66
4.3.80.0000.0406.66
4.3.70.0070.0236.66
4.3.60.0000.0236.66
4.3.50.0030.0206.66
4.3.40.0000.0476.66
4.3.30.0000.0306.66
4.3.20.0000.0236.66
4.3.10.0070.0176.66
4.3.00.0100.0277.24

preferences:
60.3 ms | 401 KiB | 5 Q