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! $value = '1'; $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.0120.00318.80
8.3.50.0150.00722.02
8.3.40.0060.01218.97
8.3.30.0090.00619.07
8.3.20.0100.00720.03
8.3.10.0060.00322.00
8.3.00.0040.00422.40
8.2.180.0110.00416.63
8.2.170.0090.00622.96
8.2.160.0070.00720.35
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0000.01426.16
8.2.120.0080.00019.48
8.2.110.0030.00822.12
8.2.100.0110.00017.84
8.2.90.0030.00618.03
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0000.01018.05
8.2.50.0060.00318.07
8.2.40.0000.00818.16
8.2.30.0040.00418.19
8.2.20.0000.00817.86
8.2.10.0000.00717.85
8.2.00.0040.00417.70
8.1.280.0110.00725.92
8.1.270.0000.00822.01
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00020.72
8.1.230.0040.00821.04
8.1.220.0060.00317.74
8.1.210.0030.00618.92
8.1.200.0070.00317.25
8.1.190.0040.00417.65
8.1.180.0000.00818.10
8.1.170.0050.00218.57
8.1.160.0000.00721.98
8.1.150.0040.00418.57
8.1.140.0000.00717.33
8.1.130.0030.00317.84
8.1.120.0040.00417.50
8.1.110.0000.00817.47
8.1.100.0050.00217.48
8.1.90.0040.00417.47
8.1.80.0000.00717.50
8.1.70.0030.00617.49
8.1.60.0040.00417.53
8.1.50.0080.00017.44
8.1.40.0000.00717.48
8.1.30.0070.00017.68
8.1.20.0040.00417.66
8.1.10.0040.00417.59
8.1.00.0040.00417.60
8.0.300.0040.00419.89
8.0.290.0040.00417.04
8.0.280.0030.00318.33
8.0.270.0070.00017.26
8.0.260.0040.00416.89
8.0.250.0030.00316.99
8.0.240.0030.00316.96
8.0.230.0030.00317.01
8.0.220.0000.00716.96
8.0.210.0030.00317.01
8.0.200.0000.00717.04
8.0.190.0040.00417.03
8.0.180.0030.00316.85
8.0.170.0050.00316.85
8.0.160.0040.00416.79
8.0.150.0070.00016.79
8.0.140.0000.00716.94
8.0.130.0030.00313.39
8.0.120.0030.00616.94
8.0.110.0000.00716.85
8.0.100.0040.00416.88
8.0.90.0050.00216.85
8.0.80.0090.00616.95
8.0.70.0000.00817.05
8.0.60.0000.00717.01
8.0.50.0000.00717.00
8.0.30.0110.01017.16
8.0.20.0120.00917.40
8.0.10.0040.00417.07
8.0.00.0160.00616.97
7.4.330.0000.00515.13
7.4.320.0030.00316.41
7.4.300.0000.00716.45
7.4.290.0070.00016.52
7.4.280.0030.00316.56
7.4.270.0030.00316.57
7.4.260.0030.00316.49
7.4.250.0000.00716.48
7.4.240.0040.00416.58
7.4.230.0000.00716.54
7.4.220.0100.00716.47
7.4.210.0060.01116.52
7.4.200.0030.00316.70
7.4.190.0040.00416.48
7.4.160.0130.00316.45
7.4.150.0120.00917.40
7.4.140.0140.00917.86
7.4.130.0070.01216.50
7.4.120.0090.00816.55
7.4.110.0090.00916.61
7.4.100.0100.01316.73
7.4.90.0110.00616.51
7.4.80.0030.01419.39
7.4.70.0110.01116.56
7.4.60.0100.00716.43
7.4.50.0030.00616.42
7.4.40.0000.01122.77
7.4.30.0060.01216.76
7.4.00.0060.00914.75
7.3.330.0000.00513.42
7.3.320.0000.00613.39
7.3.310.0000.00716.37
7.3.300.0070.00016.27
7.3.290.0080.01116.39
7.3.280.0060.00916.43
7.3.270.0190.00417.40
7.3.260.0120.00616.48
7.3.250.0080.00816.61
7.3.240.0080.00816.52
7.3.230.0070.01416.41
7.3.210.0100.00716.67
7.3.200.0160.00019.39
7.3.190.0070.00916.49
7.3.180.0040.01216.53
7.3.170.0090.00616.28
7.3.160.0100.00616.50
7.3.120.0030.01414.69
7.2.330.0070.01016.75
7.2.320.0040.01316.41
7.2.310.0140.00716.46
7.2.300.0060.01416.48
7.2.290.0030.01316.71
7.2.60.0080.00516.75
7.2.50.0000.01517.04
7.1.200.0030.00615.84
7.1.70.0000.00817.38
7.1.60.0100.01419.82
7.1.50.0070.01516.73
7.1.00.0070.07322.28
7.0.200.0090.00616.66
7.0.140.0100.06722.12
7.0.60.0130.05719.84
7.0.50.0000.08017.94
7.0.40.0170.08020.18
7.0.30.0230.03720.26
7.0.20.0370.07320.23
7.0.10.0000.04720.09
7.0.00.0170.08020.13
5.6.280.0070.06021.03
5.6.210.0030.06020.75
5.6.200.0100.04318.24
5.6.190.0030.06320.47
5.6.180.0330.07320.48
5.6.170.0270.03720.48
5.6.160.0170.07720.51
5.6.150.0100.05318.25
5.6.140.0070.08018.18
5.6.130.0030.06718.18
5.6.120.0170.07721.13
5.6.110.0100.07021.01
5.6.100.0100.04320.99
5.6.90.0100.04021.04
5.6.80.0000.06320.36
5.5.350.3200.04320.39
5.5.340.0030.09018.09
5.5.330.0070.06020.41
5.5.320.2700.04020.36
5.5.310.0170.04320.51
5.5.300.0000.04317.95
5.5.290.0070.04017.98
5.5.280.0100.03320.66
5.5.270.0070.08720.86
5.5.260.0230.07020.68
5.5.250.0030.04020.69
5.5.240.0100.07320.27
5.4.450.0200.04319.55
5.4.440.0330.04719.48
5.4.430.0200.04019.46
5.4.420.0270.06719.56
5.4.410.0300.05319.20
5.4.400.0270.05019.13
5.4.390.0200.04319.24
5.4.380.0130.04319.13
5.4.370.0230.05318.84
5.4.360.0270.07019.23
5.4.350.0270.05719.21
5.4.340.0300.07319.00
5.4.320.0300.07319.31
5.4.310.0270.06319.23
5.4.300.0300.06718.88
5.4.290.0230.07018.86
5.4.280.0270.07019.12
5.4.270.0370.05719.24
5.4.260.0230.03719.31
5.4.250.0300.03319.23
5.4.240.0370.06719.18
5.4.230.0370.03719.21
5.4.220.0270.06719.23
5.4.210.0300.06719.05
5.4.200.0200.04319.30
5.4.190.0370.05719.18
5.4.180.0330.06719.29
5.4.170.0200.04019.07
5.4.160.0270.03318.83
5.4.150.0230.03719.19
5.4.140.0200.05716.45
5.4.130.0270.04016.31
5.4.120.0330.03716.39
5.4.110.0200.06716.55
5.4.100.0200.04716.46
5.4.90.0300.04316.54
5.4.80.0230.03716.27
5.4.70.0300.06316.36
5.4.60.0300.06316.52
5.4.50.0300.03016.49
5.4.40.0300.06716.51
5.4.30.0300.06016.23
5.4.20.0230.06016.53
5.4.10.0270.03716.38
5.4.00.0370.06016.11
5.3.290.0330.04014.64
5.3.280.0270.07314.59
5.3.270.0270.03314.70
5.3.260.0270.04714.60
5.3.250.0300.04314.69
5.3.240.0200.04314.75
5.3.230.0300.07014.51
5.3.220.0270.07314.81
5.3.210.0230.06314.48
5.3.200.0300.06314.48
5.3.190.0270.04714.47
5.3.180.0170.04714.79
5.3.170.0230.03714.57
5.3.160.0170.04014.57
5.3.150.0370.06014.46
5.3.140.0200.04714.57
5.3.130.0230.05314.63
5.3.120.0330.04714.58
5.3.110.0270.03314.70
5.3.100.0200.04014.12
5.3.90.0300.02714.14
5.3.80.0200.03714.00
5.3.70.0270.06714.25
5.3.60.0170.04713.92
5.3.50.0230.04314.05
5.3.40.0230.07313.86
5.3.30.0170.04714.16
5.3.20.0270.03313.66
5.3.10.0230.05713.73
5.3.00.0230.03713.55
5.2.170.0270.05012.13
5.2.160.0230.03312.13
5.2.150.0200.04312.13
5.2.140.0200.02712.13
5.2.130.0200.03712.13
5.2.120.0200.06012.13
5.2.110.0230.06012.13
5.2.100.0300.05012.13
5.2.90.0300.05312.13
5.2.80.0230.05712.13
5.2.70.0200.06012.13
5.2.60.0270.03712.13
5.2.50.0230.04712.13
5.2.40.0200.03012.13
5.2.30.0130.03712.13
5.2.20.0170.02712.13
5.2.10.0100.03012.13
5.2.00.0170.06012.13
5.1.60.0130.03012.13
5.1.50.0170.02312.13
5.1.40.0170.03012.13
5.1.30.0170.02712.13
5.1.20.0230.03312.13
5.1.10.0130.03312.13
5.1.00.0170.02012.13
5.0.50.0070.02312.13
5.0.40.0200.04312.13
5.0.30.0100.03312.13
5.0.20.0100.03012.13
5.0.10.0030.02312.13
5.0.00.0070.03012.13
4.4.90.0100.01712.13
4.4.80.0100.01712.13
4.4.70.0100.03312.13
4.4.60.0130.01012.13
4.4.50.0100.01712.13
4.4.40.0070.05012.13
4.4.30.0100.02712.13
4.4.20.0030.02312.13
4.4.10.0030.01712.13
4.4.00.0000.03012.13
4.3.110.0000.02012.13
4.3.100.0070.02712.13
4.3.90.0100.02012.13
4.3.80.0070.03312.13
4.3.70.0130.02312.13
4.3.60.0070.02712.13
4.3.50.0070.03012.13
4.3.40.0100.04012.13
4.3.30.0030.02312.13
4.3.20.0030.03312.13
4.3.10.0070.03312.13
4.3.00.0000.02012.13

preferences:
40.44 ms | 401 KiB | 5 Q