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 = '01'; // 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.60.0110.00718.55
8.3.50.0110.01022.17
8.3.40.0140.00318.96
8.3.30.0140.00019.27
8.3.20.0040.00420.12
8.3.10.0000.00722.09
8.3.00.0040.00422.58
8.2.180.0110.00716.75
8.2.170.0100.01022.96
8.2.160.0100.00720.52
8.2.150.0000.00824.18
8.2.140.0110.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00419.36
8.2.110.0030.00721.86
8.2.100.0070.00717.97
8.2.90.0050.00519.26
8.2.80.0000.00818.03
8.2.70.0050.00317.63
8.2.60.0100.00018.05
8.2.50.0060.00318.07
8.2.40.0040.00418.16
8.2.30.0040.00418.14
8.2.20.0080.00017.72
8.2.10.0060.00317.73
8.2.00.0040.00417.63
8.1.280.0140.00425.92
8.1.270.0030.00622.12
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00323.96
8.1.230.0030.00819.16
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00917.38
8.1.180.0040.00418.10
8.1.170.0080.00018.63
8.1.160.0040.00421.89
8.1.150.0050.00218.69
8.1.140.0000.00717.37
8.1.130.0000.00717.89
8.1.120.0050.00217.44
8.1.110.0000.00717.31
8.1.100.0040.00417.51
8.1.90.0000.00817.41
8.1.80.0000.00717.50
8.1.70.0070.00017.44
8.1.60.0000.00917.53
8.1.50.0040.00417.54
8.1.40.0030.00617.48
8.1.30.0060.00317.61
8.1.20.0000.00917.68
8.1.10.0040.00417.53
8.1.00.0000.00717.48
8.0.300.0050.00318.77
8.0.290.0030.00317.18
8.0.280.0070.00018.29
8.0.270.0030.00317.20
8.0.260.0000.00616.83
8.0.250.0040.00416.93
8.0.240.0050.00216.83
8.0.230.0070.00017.01
8.0.220.0050.00316.84
8.0.210.0000.00716.89
8.0.200.0040.00417.00
8.0.190.0070.00016.93
8.0.180.0000.00716.88
8.0.170.0030.00616.91
8.0.160.0030.00516.86
8.0.150.0040.00416.88
8.0.140.0040.00416.82
8.0.130.0030.00313.39
8.0.120.0040.00416.92
8.0.110.0000.00716.97
8.0.100.0040.00416.77
8.0.90.0030.00316.84
8.0.80.0060.00917.01
8.0.70.0030.00516.84
8.0.60.0060.00317.03
8.0.50.0030.00517.03
8.0.30.0150.00517.26
8.0.20.0120.01317.40
8.0.10.0000.00716.92
8.0.00.0130.00616.79
7.4.330.0020.00215.04
7.4.320.0060.00016.47
7.4.300.0070.00016.51
7.4.290.0050.00216.46
7.4.280.0070.00016.45
7.4.270.0000.00716.63
7.4.260.0070.00016.60
7.4.250.0000.00716.58
7.4.240.0020.00516.45
7.4.230.0000.00716.59
7.4.220.0110.00716.67
7.4.210.0070.00716.58
7.4.200.0050.00316.51
7.4.190.0040.00416.47
7.4.160.0120.00416.43
7.4.150.0040.01217.40
7.4.140.0130.00517.86
7.4.130.0120.00416.63
7.4.120.0120.00616.63
7.4.110.0120.00616.49
7.4.100.0110.01116.59
7.4.90.0100.01316.40
7.4.80.0090.01319.39
7.4.70.0150.00816.68
7.4.60.0100.00616.45
7.4.50.0000.00916.17
7.4.40.0060.01022.77
7.4.30.0100.01016.58
7.4.00.0060.01215.18
7.3.330.0030.00213.43
7.3.320.0030.00313.37
7.3.310.0070.00016.18
7.3.300.0030.00316.37
7.3.290.0090.00616.38
7.3.280.0060.00916.36
7.3.270.0060.01917.40
7.3.260.0130.00316.43
7.3.250.0100.00716.44
7.3.240.0170.00016.28
7.3.230.0140.00316.57
7.3.210.0030.01416.39
7.3.200.0150.00619.39
7.3.190.0120.00916.38
7.3.180.0090.00616.45
7.3.170.0150.00616.39
7.3.160.0000.01516.38
7.3.120.0040.00414.70
7.2.330.0030.01316.53
7.2.320.0030.01516.79
7.2.310.0070.01716.62
7.2.300.0140.01016.80
7.2.290.0100.00616.41
7.2.60.0000.01017.03
7.2.00.0100.00719.13
7.1.200.0100.00315.72
7.1.100.0100.00318.27
7.1.70.0040.00417.18
7.1.60.0110.01419.82
7.1.50.0000.02416.91
7.1.00.0000.08022.54
7.0.200.0090.00616.73
7.0.140.0070.07022.09
7.0.60.0070.04319.92
7.0.50.0130.05717.95
7.0.40.0070.07720.18
7.0.30.0300.08320.07
7.0.20.0230.07320.10
7.0.10.0300.05720.26
7.0.00.0130.08020.23
5.6.280.0100.06721.11
5.6.210.0100.03320.77
5.6.200.0200.07318.23
5.6.190.0070.08020.77
5.6.180.4130.04020.41
5.6.170.0270.05020.54
5.6.160.0170.08020.55
5.6.150.0030.04318.19
5.6.140.0000.05018.28
5.6.130.0130.03318.22
5.6.120.0070.07321.01
5.6.110.0030.05720.98
5.6.100.0100.07021.05
5.6.90.0100.08720.97
5.6.80.0030.04020.38
5.6.70.0200.04020.53
5.5.350.0070.08320.53
5.5.340.0030.08717.96
5.5.330.0000.04320.35
5.5.320.0200.05320.29
5.5.310.0400.05020.30
5.5.300.0030.08717.94
5.5.290.0100.08017.92
5.5.280.0100.08320.98
5.5.270.0030.04720.96
5.5.260.0200.07320.98
5.5.250.0030.06720.72
5.5.240.0030.04720.20
5.4.450.0670.05319.41
5.4.440.0600.05319.23
5.4.430.0030.07319.39
5.4.420.0170.05019.63
5.4.410.0130.05719.30
5.4.400.0830.00018.50
5.4.390.1000.00018.48
5.4.380.0270.05018.48
5.4.370.0170.05018.75
5.4.360.0070.05018.61
5.4.350.0300.04718.54
5.4.340.0230.04018.81
5.4.320.0040.03812.51
5.4.310.0070.03712.51
5.4.300.0080.03412.51
5.4.290.0070.04012.50
5.4.280.0080.03412.40
5.4.270.0070.07018.65
5.4.260.0200.06318.77
5.4.250.0200.07018.98
5.4.240.0070.08018.79
5.4.230.0130.08019.03
5.4.220.0230.04719.02
5.4.210.0100.08019.09
5.4.200.0170.05018.80
5.4.190.0100.05318.95
5.4.180.0100.07718.80
5.4.170.0030.06718.83
5.4.160.0100.05718.73
5.4.150.0100.05718.89
5.4.140.0100.06316.52
5.4.130.0100.07016.34
5.4.120.0200.06016.34
5.4.110.0100.07316.37
5.4.100.0070.05316.36
5.4.90.0070.06016.42
5.4.80.0100.05016.39
5.4.70.0030.05016.54
5.4.60.0030.05716.47
5.4.50.0100.06716.48
5.4.40.0230.05716.55
5.4.30.0170.06016.63
5.4.20.0100.05316.46
5.4.10.0100.06016.51
5.4.00.0070.06715.79
5.3.290.0060.04212.80
5.3.280.0170.06314.59
5.3.270.0030.07714.60
5.3.260.0130.04714.44
5.3.250.0130.07714.77
5.3.240.0100.05714.64
5.3.230.0070.06714.59
5.3.220.0000.05714.74
5.3.210.0070.06014.80
5.3.200.0100.05014.57
5.3.190.0030.05314.64
5.3.180.0100.07314.48
5.3.170.0030.05314.57
5.3.160.0100.06014.59
5.3.150.0070.06014.79
5.3.140.0130.06014.66
5.3.130.0070.05714.77
5.3.120.0130.07714.62
5.3.110.0070.07714.78
5.3.100.0130.06714.13
5.3.90.0130.05014.10
5.3.80.0170.05714.10
5.3.70.0100.07014.25
5.3.60.0130.06713.99
5.3.50.0130.06014.12
5.3.40.0170.04713.94
5.3.30.0170.04713.92
5.3.20.0030.05013.79
5.3.10.0070.06713.84
5.3.00.0100.05313.82
5.2.170.0070.06711.11
5.2.160.0070.04711.05
5.2.150.0100.04311.32
5.2.140.0130.05011.20
5.2.130.0030.06011.00
5.2.120.0130.04711.16
5.2.110.0070.04011.10
5.2.100.0200.04011.05
5.2.90.0030.04011.28
5.2.80.0030.05311.05
5.2.70.0070.04311.08
5.2.60.0130.03711.27
5.2.50.0070.05710.99
5.2.40.0100.05310.98
5.2.30.0030.06311.20
5.2.20.0000.04711.05
5.2.10.0030.04010.87
5.2.00.0100.05010.80
5.1.60.0070.04010.00
5.1.50.0170.02710.10
5.1.40.0030.0379.90
5.1.30.0070.03310.42
5.1.20.0000.05310.34
5.1.10.0100.03710.26
5.1.00.0070.04710.27
5.0.50.0100.0338.39
5.0.40.0070.0238.37
5.0.30.0170.0438.24
5.0.20.0170.0278.18
5.0.10.0070.0278.10
5.0.00.0000.0478.00
4.4.90.0030.0236.75
4.4.80.0070.0276.75
4.4.70.0000.0306.75
4.4.60.0000.0236.75
4.4.50.0100.0276.75
4.4.40.0070.0376.75
4.4.30.0030.0236.75
4.4.20.0000.0276.75
4.4.10.0070.0206.75
4.4.00.0000.0436.75
4.3.110.0030.0236.75
4.3.100.0030.0306.75
4.3.90.0070.0176.75
4.3.80.0030.0336.75
4.3.70.0000.0236.75
4.3.60.0100.0206.75
4.3.50.0130.0206.75
4.3.40.0070.0406.75
4.3.30.0000.0236.75
4.3.20.0030.0236.75
4.3.10.0000.0306.75
4.3.00.0130.0176.47

preferences:
41.77 ms | 401 KiB | 5 Q