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 $value = $v(); // and a callback! $this->{$key} = $value; } } $test = new Test; // start editing here $cl1 = static function() { return $this->secret; }; $a = array('test','run'); Closure::bind($cl1, null, $test); $test->secret = $a; // 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.0160.00018.43
8.3.50.0070.01221.99
8.3.40.0040.01118.84
8.3.30.0060.00819.21
8.3.20.0040.00420.34
8.3.10.0080.00021.92
8.3.00.0030.00622.40
8.2.180.0130.01016.47
8.2.170.0140.00422.96
8.2.160.0060.00920.58
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0100.00326.16
8.2.120.0060.00319.38
8.2.110.0030.00620.47
8.2.100.0000.01218.03
8.2.90.0030.00619.22
8.2.80.0000.00818.05
8.2.70.0080.00017.63
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0070.00018.28
8.2.30.0000.00718.20
8.2.20.0040.00417.80
8.2.10.0030.00517.70
8.2.00.0040.00417.81
8.1.280.0070.00725.92
8.1.270.0050.00222.18
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0090.00023.52
8.1.230.0040.00820.84
8.1.220.0040.00417.91
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00517.40
8.1.180.0040.00718.10
8.1.170.0040.00418.50
8.1.160.0040.00422.07
8.1.150.0030.00618.64
8.1.140.0050.00217.37
8.1.130.0030.00517.78
8.1.120.0050.00317.50
8.1.110.0030.00317.52
8.1.100.0040.00417.54
8.1.90.0030.00517.43
8.1.80.0040.00417.38
8.1.70.0070.00017.44
8.1.60.0050.00817.63
8.1.50.0030.00617.57
8.1.40.0080.00017.43
8.1.30.0040.00417.55
8.1.20.0050.00317.56
8.1.10.0030.00517.43
8.1.00.0000.01117.51
8.0.300.0070.00018.77
8.0.290.0040.00417.18
8.0.280.0040.00418.40
8.0.270.0000.00717.27
8.0.260.0030.00316.82
8.0.250.0000.00716.99
8.0.240.0000.00716.93
8.0.230.0000.00716.93
8.0.220.0070.00016.96
8.0.210.0040.00416.93
8.0.200.0050.00217.02
8.0.190.0070.00017.05
8.0.180.0070.00017.00
8.0.170.0040.00417.04
8.0.160.0040.00416.97
8.0.150.0040.00416.91
8.0.140.0000.00716.96
8.0.130.0000.00713.40
8.0.120.0040.00416.96
8.0.110.0050.00316.86
8.0.100.0040.00416.77
8.0.90.0030.00516.80
8.0.80.0150.00617.00
8.0.70.0050.00216.83
8.0.60.0030.00516.86
8.0.50.0000.00817.04
8.0.30.0130.00617.25
8.0.20.0110.01317.40
8.0.10.0040.00416.95
8.0.00.0090.00916.71
7.4.330.0000.00715.00
7.4.320.0030.00316.60
7.4.300.0000.00616.55
7.4.290.0070.00016.59
7.4.280.0000.00716.62
7.4.270.0030.00316.48
7.4.260.0040.00416.60
7.4.250.0050.00316.48
7.4.240.0050.00316.58
7.4.230.0000.00716.66
7.4.220.0070.01016.48
7.4.210.0050.01116.61
7.4.200.0030.00316.47
7.4.190.0040.00416.75
7.4.160.0160.00016.36
7.4.150.0070.01617.40
7.4.140.0070.01417.86
7.4.130.0110.00816.51
7.4.120.0100.01216.55
7.4.110.0030.01316.63
7.4.100.0070.01116.67
7.4.90.0120.00616.55
7.4.80.0060.01019.39
7.4.70.0090.00916.62
7.4.60.0030.01316.57
7.4.50.0030.00516.55
7.4.40.0070.01122.77
7.4.30.0070.01016.63
7.4.00.0100.00615.09
7.3.330.0050.00013.27
7.3.320.0060.00013.42
7.3.310.0040.00416.54
7.3.300.0030.00316.49
7.3.290.0050.00916.44
7.3.280.0050.01016.38
7.3.270.0040.01517.40
7.3.260.0150.00716.42
7.3.250.0100.00716.47
7.3.240.0100.00616.38
7.3.230.0100.01016.39
7.3.210.0140.00416.52
7.3.200.0100.01019.39
7.3.190.0030.01316.42
7.3.180.0150.00616.39
7.3.170.0070.01016.36
7.3.160.0150.00716.40
7.3.120.0090.00615.01
7.2.330.0120.00716.64
7.2.320.0160.01216.70
7.2.310.0130.00316.39
7.2.300.0100.00716.59
7.2.290.0060.01116.56
7.2.80.0000.00816.61
7.2.60.0060.00916.78
7.2.00.0060.01219.28
7.1.200.0030.00815.85
7.1.100.0000.01218.20
7.1.70.0000.00816.90
7.1.60.0070.01419.82
7.1.50.0090.01616.96
7.1.00.0030.07722.28
7.0.200.0100.00016.73
7.0.140.0000.07721.98
7.0.100.0230.08019.95
7.0.90.0270.07019.90
7.0.80.0030.08020.01
7.0.70.0100.04319.87
7.0.60.0270.07019.88
7.0.50.0070.03720.31
7.0.40.0000.08320.00
7.0.30.0030.04720.02
7.0.20.0100.06720.14
7.0.10.0100.03720.09
7.0.00.0130.05020.13
5.6.280.0070.07020.82
5.6.250.0100.08720.58
5.6.240.0130.07020.59
5.6.230.0100.08320.73
5.6.220.0100.04320.68
5.6.210.0070.09720.57
5.6.200.0070.04721.09
5.6.190.0100.08021.09
5.6.180.0000.08321.02
5.6.170.0070.08321.05
5.6.160.0030.04321.05
5.6.150.0100.05321.13
5.6.140.0070.06321.13
5.6.130.0100.07321.05
5.6.120.0030.08721.08
5.6.110.0030.09321.08
5.6.100.0130.07321.10
5.6.90.0100.08320.94
5.6.80.0100.08020.50
5.6.70.0070.06020.41
5.6.60.0070.04320.31
5.6.50.0170.07320.36
5.6.40.0070.07720.50
5.6.30.0170.06020.36
5.6.20.0100.06020.29
5.6.10.0070.06320.36
5.6.00.0030.04020.35
5.5.380.0070.08020.41
5.5.370.0100.05020.49
5.5.360.0200.03720.37
5.5.350.0070.04020.40
5.5.340.0070.04020.93
5.5.330.0130.06320.76
5.5.320.0070.05320.78
5.5.310.0100.04720.93
5.5.300.0070.08320.88
5.5.290.0100.05020.88
5.5.280.0030.08020.89
5.5.270.0100.08720.65
5.5.260.0130.07020.73
5.5.250.0100.09020.70
5.5.240.0230.05320.13
5.5.230.0100.07720.12
5.5.220.0130.05720.28
5.5.210.0000.08020.13
5.5.200.0000.06320.13
5.5.190.0130.04020.27
5.5.180.0100.05020.24
5.5.160.0030.05020.13
5.5.150.0130.07020.24
5.5.140.0030.07720.27
5.5.130.0170.07320.15
5.5.120.0070.07720.13
5.5.110.0030.05320.26
5.5.100.0030.08320.09
5.5.90.0100.07720.16
5.5.80.0130.03319.98
5.5.70.0130.06720.05
5.5.60.0030.05320.13
5.5.50.0200.05319.95
5.5.40.0130.05320.05
5.5.30.0000.05720.06
5.5.20.0100.06020.05
5.5.10.0000.06720.09
5.5.00.0100.06320.05
5.4.450.0100.04019.29
5.4.440.0130.07019.45
5.4.430.0100.08319.17
5.4.420.0100.07019.52
5.4.410.0130.03719.26
5.4.400.0100.04719.21
5.4.390.0130.06718.90
5.4.380.0030.08319.23
5.4.370.0130.05719.04
5.4.360.0030.05018.85
5.4.350.0030.04318.88
5.4.340.0130.07018.88
5.4.320.0130.03318.91
5.4.310.0030.03719.05
5.4.300.0100.04319.02
5.4.290.0130.07018.89
5.4.280.0000.04719.02
5.4.270.0100.07019.04
5.4.260.0030.07018.90
5.4.250.0130.05718.94
5.4.240.0030.06718.84
5.4.230.0030.04019.08
5.4.220.0100.03719.04
5.4.210.0030.06719.04
5.4.200.0030.08319.17
5.4.190.0130.07319.11
5.4.180.0070.04319.17
5.4.170.0170.06718.94
5.4.160.0100.07019.13
5.4.150.0100.07319.02
5.4.140.0070.04316.50
5.4.130.0030.07316.36
5.4.120.0130.03016.14
5.4.110.0070.07016.34
5.4.100.0070.03716.36
5.4.90.0070.03316.32
5.4.80.0070.06716.41
5.4.70.0070.06016.48
5.4.60.0100.05716.37
5.4.50.0100.06716.51
5.4.40.0070.06316.54
5.4.30.0100.06016.41
5.4.20.0070.03716.40
5.4.10.0070.05316.30
5.4.00.0100.03715.82
5.3.290.0100.05014.78
5.3.280.0100.06714.73
5.3.270.0100.05314.64
5.3.260.0030.07014.59
5.3.250.0130.07314.60
5.3.240.0070.06714.68
5.3.230.0000.04314.66
5.3.220.0030.06014.58
5.3.210.0230.02714.68
5.3.200.0070.04014.58
5.3.190.0030.05714.64
5.3.180.0100.04014.60
5.3.170.0070.05014.71
5.3.160.0100.07314.55
5.3.150.0070.06314.60
5.3.140.0170.06314.49
5.3.130.0200.05714.52
5.3.120.0000.08314.54
5.3.110.0100.07314.56
5.3.100.0100.06713.96
5.3.90.0030.07714.04
5.3.80.0070.08014.11
5.3.70.0100.03713.91
5.3.60.0100.06313.93
5.3.50.0070.06713.88
5.3.40.0070.04713.93
5.3.30.0130.05314.03
5.3.20.0030.05313.70
5.3.10.0070.03713.72
5.3.00.0000.04013.73
5.2.170.0100.05311.25
5.2.160.0070.04711.18
5.2.150.0030.06011.02
5.2.140.0000.03711.06
5.2.130.0000.05310.99
5.2.120.0100.02711.11
5.2.110.0030.04011.13
5.2.100.0070.06711.02
5.2.90.0000.06011.24
5.2.80.0100.02711.10
5.2.70.0000.03311.21
5.2.60.0000.03711.11
5.2.50.0030.03011.01
5.2.40.0070.02310.91
5.2.30.0030.03010.88
5.2.20.0000.03310.88
5.2.10.0070.02310.93
5.2.00.0000.03010.67
5.1.60.0030.02010.06
5.1.50.0000.0239.85
5.1.40.0070.02010.09
5.1.30.0100.02010.46
5.1.20.0030.03010.31
5.1.10.0000.0279.92
5.1.00.0000.0279.96
5.0.50.0030.0208.56
5.0.40.0000.0208.45
5.0.30.0000.0338.22
5.0.20.0000.0178.20
5.0.10.0000.0178.04
5.0.00.0070.0608.16
4.4.90.0030.0137.94
4.4.80.0000.0177.94
4.4.70.0000.0177.94
4.4.60.0000.0177.94
4.4.50.0000.0137.94
4.4.40.0030.0237.94
4.4.30.0000.0177.94
4.4.20.0000.0177.94
4.4.10.0000.0177.94
4.4.00.0000.0277.94
4.3.110.0030.0137.94
4.3.100.0000.0377.94
4.3.90.0000.0277.94
4.3.80.0030.0407.94
4.3.70.0000.0237.94
4.3.60.0070.0307.94
4.3.50.0000.0177.94
4.3.40.0070.0477.94
4.3.30.0000.0207.94
4.3.20.0000.0177.94
4.3.10.0030.0307.94
4.3.00.0000.0177.94

preferences:
43.88 ms | 401 KiB | 5 Q