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; }; Closure::bind($cl1, null, $test); $test->secret = array('a','b'); // 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.0120.00618.68
8.3.50.0130.00721.99
8.3.40.0070.00718.75
8.3.30.0150.00319.17
8.3.20.0040.00420.25
8.3.10.0050.00322.10
8.3.00.0080.00022.45
8.2.180.0130.00616.88
8.2.170.0070.01422.96
8.2.160.0110.00320.53
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0030.01426.16
8.2.120.0080.00017.60
8.2.110.0070.00322.07
8.2.100.0090.00319.76
8.2.90.0040.00419.34
8.2.80.0030.00518.05
8.2.70.0040.00417.50
8.2.60.0000.00918.16
8.2.50.0030.00518.07
8.2.40.0060.00318.22
8.2.30.0000.00718.13
8.2.20.0040.00417.91
8.2.10.0050.00317.81
8.2.00.0000.00717.70
8.1.280.0140.00425.92
8.1.270.0040.00422.03
8.1.260.0080.00026.35
8.1.250.0020.00528.09
8.1.240.0090.00023.84
8.1.230.0080.00319.15
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0000.00817.35
8.1.190.0080.00017.40
8.1.180.0060.00318.10
8.1.170.0040.00418.50
8.1.160.0040.00422.09
8.1.150.0040.00418.69
8.1.140.0070.00317.44
8.1.130.0000.00717.84
8.1.120.0050.00217.48
8.1.110.0040.00417.36
8.1.100.0070.00017.41
8.1.90.0050.00317.43
8.1.80.0070.00017.38
8.1.70.0000.00717.43
8.1.60.0030.00617.61
8.1.50.0000.00717.46
8.1.40.0060.00317.54
8.1.30.0000.00817.65
8.1.20.0040.00417.63
8.1.10.0030.00517.49
8.1.00.0030.00617.47
8.0.300.0030.00518.77
8.0.290.0040.00416.93
8.0.280.0000.00718.45
8.0.270.0000.00717.15
8.0.260.0030.00316.75
8.0.250.0070.00017.00
8.0.240.0040.00416.93
8.0.230.0030.00316.88
8.0.220.0000.00716.90
8.0.210.0030.00316.86
8.0.200.0040.00416.89
8.0.190.0000.00816.94
8.0.180.0000.00717.05
8.0.170.0000.00816.90
8.0.160.0040.00417.11
8.0.150.0000.00816.82
8.0.140.0040.00416.83
8.0.130.0030.00313.49
8.0.120.0050.00317.00
8.0.110.0040.00416.95
8.0.100.0080.00017.04
8.0.90.0000.00717.02
8.0.80.0120.00316.91
8.0.70.0000.00716.83
8.0.60.0000.00717.07
8.0.50.0020.00516.85
8.0.30.0080.01017.01
8.0.20.0170.00917.47
8.0.10.0050.00317.05
8.0.00.0120.00716.64
7.4.330.0020.00215.09
7.4.320.0030.00316.60
7.4.300.0000.00616.62
7.4.290.0030.00516.43
7.4.280.0030.00316.46
7.4.270.0000.00716.63
7.4.260.0000.00716.43
7.4.250.0050.00316.59
7.4.240.0020.00516.66
7.4.230.0000.00716.69
7.4.220.0090.00916.60
7.4.210.0100.00616.54
7.4.200.0000.00716.57
7.4.190.0050.00216.43
7.4.160.0120.00316.47
7.4.150.0110.00617.40
7.4.140.0090.01017.86
7.4.130.0060.01516.46
7.4.120.0060.01116.57
7.4.110.0120.01216.44
7.4.100.0090.00916.57
7.4.90.0070.01016.52
7.4.80.0180.00619.39
7.4.70.0110.00416.52
7.4.60.0070.01016.63
7.4.50.0000.00916.23
7.4.40.0040.01122.77
7.4.30.0070.01316.36
7.4.00.0040.01114.98
7.3.330.0000.00513.23
7.3.320.0020.00213.30
7.3.310.0070.00016.34
7.3.300.0070.00016.32
7.3.290.0120.00416.38
7.3.280.0120.00816.38
7.3.270.0030.01317.40
7.3.260.0110.01116.45
7.3.250.0150.00716.50
7.3.240.0120.00616.36
7.3.230.0060.01616.40
7.3.210.0120.00616.51
7.3.200.0070.01419.39
7.3.190.0130.01016.32
7.3.180.0100.00616.45
7.3.170.0090.00616.45
7.3.160.0080.00816.34
7.3.120.0080.00714.93
7.3.110.0110.00514.72
7.3.100.0040.01014.88
7.3.90.0100.00314.89
7.3.80.0080.00314.60
7.3.70.0070.00814.85
7.3.60.0040.00714.97
7.3.50.0060.00614.79
7.3.40.0080.00814.86
7.3.30.0060.00514.81
7.3.20.0080.00616.79
7.3.10.0110.00516.54
7.3.00.0110.00416.71
7.2.330.0100.00716.79
7.2.320.0080.01416.78
7.2.310.0100.00716.63
7.2.300.0130.01016.66
7.2.290.0130.00316.38
7.2.250.0050.01515.04
7.2.240.0060.01114.76
7.2.230.0060.00615.16
7.2.220.0030.00815.02
7.2.210.0100.00514.94
7.2.200.0030.00915.09
7.2.190.0050.00915.04
7.2.180.0090.00514.85
7.2.170.0100.00315.13
7.2.80.0030.01316.68
7.2.60.0080.00416.96
7.2.00.0100.00318.99
7.1.330.0070.00815.69
7.1.320.0020.01315.92
7.1.310.0080.00315.81
7.1.300.0040.00915.64
7.1.290.0030.00815.71
7.1.280.0000.01315.57
7.1.270.0100.00615.77
7.1.260.0090.00515.78
7.1.200.0060.00315.80
7.1.100.0080.00418.37
7.1.70.0000.00817.07
7.1.60.0140.01119.82
7.1.50.0070.01316.91
7.1.00.0000.08022.31
7.0.200.0000.00816.39
7.0.140.0070.07022.10
7.0.60.0070.08319.95
7.0.50.0070.07317.96
7.0.40.0100.04020.13
7.0.30.0330.06320.11
7.0.20.0270.08020.30
7.0.10.0370.04320.11
7.0.00.0100.08020.06
5.6.280.0030.07720.91
5.6.210.0070.08020.59
5.6.200.0130.08018.15
5.6.190.0070.07320.39
5.6.180.4130.04320.61
5.6.170.0230.05320.48
5.6.160.0170.07320.50
5.6.150.0100.05718.19
5.6.140.0130.03018.25
5.6.130.0100.03318.18
5.6.120.0030.08021.13
5.6.110.0030.08021.00
5.6.100.0070.09020.98
5.6.90.0100.08721.04
5.6.80.0030.03720.53
5.6.70.0270.08020.41
5.5.350.0000.09020.45
5.5.340.0100.07317.96
5.5.330.0030.04720.28
5.5.320.0170.04720.37
5.5.310.0400.07720.30
5.5.300.0100.07317.93
5.5.290.0070.04718.07
5.5.280.0070.05320.91
5.5.270.0030.08720.87
5.5.260.0030.06020.62
5.5.250.0070.07320.69
5.5.240.0030.03720.36
5.4.450.0500.05019.65
5.4.440.0600.05319.22
5.4.430.0070.06019.41
5.4.420.0170.04719.52
5.4.410.0070.05719.57
5.4.400.1000.00018.77
5.4.390.1430.00018.73
5.4.380.0230.05718.54
5.4.370.0200.05318.73
5.4.360.0230.04318.71
5.4.350.0130.04318.57
5.4.340.0030.05318.61
5.4.320.0060.03612.50
5.4.310.0050.04412.51
5.4.300.0060.04212.51
5.4.290.0040.04012.50
5.4.280.0040.03712.40
5.4.270.0030.05319.00
5.4.260.0130.05018.84
5.4.250.0030.06718.94
5.4.240.0030.08018.84
5.4.230.0030.06319.09
5.4.220.0200.06718.75
5.4.210.0130.04719.00
5.4.200.0100.07019.02
5.4.190.0070.05318.74
5.4.180.0030.08318.84
5.4.170.0000.08018.90
5.4.160.0100.05718.81
5.4.150.0000.06318.79
5.4.140.0030.07716.43
5.4.130.0170.05716.56
5.4.120.0100.04716.38
5.4.110.0070.08316.57
5.4.100.0070.05016.48
5.4.90.0100.07016.39
5.4.80.0070.07316.41
5.4.70.0170.04716.33
5.4.60.0130.05016.47
5.4.50.0100.06016.46
5.4.40.0100.06316.58
5.4.30.0100.05016.39
5.4.20.0100.05016.48
5.4.10.0070.05316.59
5.4.00.0070.07015.87
5.3.290.0030.04412.80
5.3.280.0030.06014.70
5.3.270.0100.07314.67
5.3.260.0130.05014.59
5.3.250.0130.04314.67
5.3.240.0200.06014.52
5.3.230.0100.05014.62
5.3.220.0000.06314.66
5.3.210.0070.06014.55
5.3.200.0100.05014.56
5.3.190.0030.07714.55
5.3.180.0100.05014.55
5.3.170.0170.05714.65
5.3.160.0170.04714.54
5.3.150.0100.05014.59
5.3.140.0070.06314.55
5.3.130.0130.05314.68
5.3.120.0130.08014.73
5.3.110.0100.05314.71
5.3.100.0170.06014.11
5.3.90.0030.06714.16
5.3.80.0030.07714.04
5.3.70.0000.06014.00
5.3.60.0070.06314.08
5.3.50.0100.07013.97
5.3.40.0130.06714.02
5.3.30.0070.05314.00
5.3.20.0130.04713.71
5.3.10.0070.05313.72
5.3.00.0130.05013.80
5.2.170.0030.05711.23
5.2.160.0000.05711.32
5.2.150.0030.05311.23
5.2.140.0200.05011.23
5.2.130.0030.06711.18
5.2.120.0070.04310.93
5.2.110.0030.04011.28
5.2.100.0100.05011.09
5.2.90.0070.05311.32
5.2.80.0100.04311.05
5.2.70.0170.05011.00
5.2.60.0030.04311.22
5.2.50.0100.03711.02
5.2.40.0100.03710.95
5.2.30.0070.05310.98
5.2.20.0100.03710.95
5.2.10.0070.04710.86
5.2.00.0070.05710.90
5.1.60.0100.04310.09
5.1.50.0130.03310.05
5.1.40.0000.05310.02
5.1.30.0100.03010.52
5.1.20.0130.03010.52
5.1.10.0030.03710.07
5.1.00.0030.04010.23
5.0.50.0030.0408.56
5.0.40.0070.0338.41
5.0.30.0070.0538.22
5.0.20.0030.0278.27
5.0.10.0000.0338.11
5.0.00.0070.0378.13
4.4.90.0000.0336.64
4.4.80.0030.0306.64
4.4.70.0000.0236.64
4.4.60.0030.0276.64
4.4.50.0030.0306.64
4.4.40.0070.0306.63
4.4.30.0030.0206.63
4.4.20.0100.0276.63
4.4.10.0000.0276.63
4.4.00.0170.0306.63
4.3.110.0070.0206.63
4.3.100.0000.0336.63
4.3.90.0070.0236.63
4.3.80.0070.0406.63
4.3.70.0000.0336.63
4.3.60.0030.0206.63
4.3.50.0030.0276.63
4.3.40.0030.0406.63
4.3.30.0000.0336.63
4.3.20.0000.0236.63
4.3.10.0030.0276.63
4.3.00.0030.0206.46

preferences:
42.95 ms | 401 KiB | 5 Q