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) { echo $k;exit; $key = $v[($v[$v])]; // $v is some kind of weird array $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.60.0170.00318.28
8.3.50.0120.01022.11
8.3.40.0070.00718.79
8.3.30.0090.00619.27
8.3.20.0030.00620.32
8.3.10.0050.00322.09
8.3.00.0070.00022.58
8.2.180.0160.00616.88
8.2.170.0100.00722.96
8.2.160.0040.01120.43
8.2.150.0080.00024.18
8.2.140.0130.00324.66
8.2.130.0050.00326.16
8.2.120.0040.00417.50
8.2.110.0110.00021.07
8.2.100.0000.01117.91
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0040.00417.75
8.2.60.0040.00417.93
8.2.50.0060.00318.10
8.2.40.0030.00618.22
8.2.30.0040.00418.07
8.2.20.0070.00017.74
8.2.10.0060.00317.81
8.2.00.0000.00817.66
8.1.280.0120.00625.92
8.1.270.0070.00422.19
8.1.260.0000.00726.35
8.1.250.0030.00628.09
8.1.240.0090.00023.92
8.1.230.0030.00721.04
8.1.220.0040.00417.78
8.1.210.0030.00518.77
8.1.200.0040.00417.47
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0080.00018.57
8.1.160.0030.00522.07
8.1.150.0040.00418.68
8.1.140.0040.00417.35
8.1.130.0030.00317.84
8.1.120.0050.00217.43
8.1.110.0060.00317.32
8.1.100.0050.00317.46
8.1.90.0050.00317.44
8.1.80.0050.00317.51
8.1.70.0030.00317.46
8.1.60.0040.00417.64
8.1.50.0040.00417.54
8.1.40.0030.00517.47
8.1.30.0000.00717.60
8.1.20.0030.00517.62
8.1.10.0000.00717.56
8.1.00.0000.01017.53
8.0.300.0000.00718.77
8.0.290.0030.00516.58
8.0.280.0000.00718.45
8.0.270.0000.00717.26
8.0.260.0050.00316.89
8.0.250.0030.00316.91
8.0.240.0070.00016.95
8.0.230.0030.00316.95
8.0.220.0050.00216.82
8.0.210.0000.00716.82
8.0.200.0000.00917.00
8.0.190.0000.00716.96
8.0.180.0050.00216.99
8.0.170.0050.00316.98
8.0.160.0040.00416.98
8.0.150.0070.00016.91
8.0.140.0040.00416.90
8.0.130.0030.00313.31
8.0.120.0040.00416.80
8.0.110.0000.00716.88
8.0.100.0040.00416.75
8.0.90.0050.00216.83
8.0.80.0070.00916.99
8.0.70.0040.00417.02
8.0.60.0000.00716.94
8.0.50.0040.00416.82
8.0.30.0110.01017.04
8.0.20.0130.01017.40
8.0.10.0080.00017.05
8.0.00.0090.01016.80
7.4.330.0050.00015.00
7.4.320.0060.00016.50
7.4.300.0060.00016.51
7.4.290.0000.00616.46
7.4.280.0000.00716.49
7.4.270.0000.00716.49
7.4.260.0000.00716.41
7.4.250.0040.00416.37
7.4.240.0030.00416.57
7.4.230.0000.00816.63
7.4.220.0070.01016.55
7.4.210.0040.01016.52
7.4.200.0070.00016.63
7.4.190.0040.00416.37
7.4.160.0100.00616.45
7.4.150.0130.01117.40
7.4.140.0130.00717.86
7.4.130.0080.01216.61
7.4.120.0160.00316.52
7.4.110.0090.00916.62
7.4.100.0060.01116.52
7.4.90.0100.00716.51
7.4.80.0060.01019.39
7.4.70.0060.01016.40
7.4.60.0030.01316.44
7.4.50.0020.00516.62
7.4.40.0060.00922.77
7.4.30.0070.01416.58
7.4.00.0030.00915.00
7.3.330.0000.00513.22
7.3.320.0000.00613.34
7.3.310.0000.00716.46
7.3.300.0070.00016.21
7.3.290.0030.01016.36
7.3.280.0060.01216.35
7.3.270.0100.01017.40
7.3.260.0070.01016.57
7.3.250.0080.01216.50
7.3.240.0070.01016.55
7.3.230.0050.01716.39
7.3.210.0040.01216.36
7.3.200.0090.00919.39
7.3.190.0250.02716.50
7.3.180.0060.01016.31
7.3.170.0130.00316.58
7.3.160.0000.02216.52
7.3.120.0110.00314.71
7.2.330.0110.00716.71
7.2.320.0130.00916.77
7.2.310.0090.00916.41
7.2.300.0110.00716.64
7.2.290.0130.00316.80
7.2.60.0080.01016.87
7.1.200.0030.01015.71
7.1.70.0030.00516.86
7.1.60.0070.00419.82
7.1.50.0090.01616.89
7.1.00.0070.07022.36
7.0.200.0000.00716.82
7.0.140.0070.07021.98
7.0.60.0030.05019.92
7.0.50.0100.03717.89
7.0.40.0130.08720.23
7.0.30.0330.05020.33
7.0.20.0270.06320.19
7.0.10.0330.07320.19
7.0.00.0030.05320.06
5.6.280.0000.07320.78
5.6.210.0070.08020.57
5.6.200.0030.04018.28
5.6.190.0100.08320.43
5.6.180.3030.04020.47
5.6.170.0200.04720.60
5.6.160.0100.08320.66
5.6.150.0000.04318.16
5.6.140.0070.08018.14
5.6.130.0070.07018.19
5.6.120.0030.08721.13
5.6.110.0100.05021.02
5.6.100.0030.09321.09
5.6.90.0030.04020.88
5.6.80.0000.08020.53
5.6.70.0170.03320.37
5.5.350.0000.10320.39
5.5.340.0070.03718.02
5.5.330.0130.03020.27
5.5.320.0200.04020.35
5.5.310.0300.07720.34
5.5.300.0100.05717.98
5.5.290.0130.06318.08
5.5.280.0030.08720.98
5.5.270.0070.06020.89
5.5.260.0070.05020.75
5.5.250.0070.03720.70
5.5.240.0030.04020.05
5.4.450.0730.05719.71
5.4.440.0630.04719.39
5.4.430.0170.04719.39
5.4.420.0100.06719.42
5.4.410.0070.05719.28
5.4.400.1000.00018.51
5.4.390.0730.00018.59
5.4.380.0200.05718.54
5.4.370.0170.05018.48
5.4.360.0100.05718.59
5.4.350.0170.05318.70
5.4.340.0200.04718.74
5.4.320.0060.04012.51
5.4.310.0070.04612.50
5.4.300.0060.04512.51
5.4.290.0090.03412.50
5.4.280.0050.03812.40
5.4.270.0100.06719.00
5.4.260.0200.06718.65
5.4.250.0100.07319.03
5.4.240.0130.04718.94
5.4.230.0070.05718.94
5.4.220.0000.07018.74
5.4.210.0100.05018.74
5.4.200.0170.05018.79
5.4.190.0200.06718.78
5.4.180.0130.04718.98
5.4.170.0100.07718.79
5.4.160.0100.05718.95
5.4.150.0070.08018.97
5.4.140.0100.06316.42
5.4.130.0100.04716.55
5.4.120.0170.05316.53
5.4.110.0070.05716.49
5.4.100.0100.06016.55
5.4.90.0070.05716.65
5.4.80.0000.06016.49
5.4.70.0100.06716.34
5.4.60.0030.05716.48
5.4.50.0100.06716.40
5.4.40.0130.05016.58
5.4.30.0130.04316.50
5.4.20.0100.05716.61
5.4.10.0130.05716.52
5.4.00.0070.06015.88
5.3.290.0070.04312.80
5.3.280.0030.08014.68
5.3.270.0100.06314.52
5.3.260.0100.07014.71
5.3.250.0070.06014.75
5.3.240.0070.06014.68
5.3.230.0100.06714.68
5.3.220.0100.05714.58
5.3.210.0070.07314.71
5.3.200.0000.05714.65
5.3.190.0030.05714.74
5.3.180.0030.06314.65
5.3.170.0100.05014.75
5.3.160.0030.05714.64
5.3.150.0130.07014.55
5.3.140.0100.07314.75
5.3.130.0200.06714.64
5.3.120.0170.06014.54
5.3.110.0130.06014.57
5.3.100.0070.05714.10
5.3.90.0100.04714.11
5.3.80.0170.07014.04
5.3.70.0200.04314.01
5.3.60.0130.05014.02
5.3.50.0070.06013.94
5.3.40.0100.06714.12
5.3.30.0100.05013.90
5.3.20.0130.04713.55
5.3.10.0070.06013.74
5.3.00.0170.05713.82
5.2.170.0200.05011.37
5.2.160.0200.05311.23
5.2.150.0100.04711.21
5.2.140.0230.04011.21
5.2.130.0030.04711.26
5.2.120.0070.04011.19
5.2.110.0000.04311.28
5.2.100.0200.03010.93
5.2.90.0130.04711.05
5.2.80.0070.04711.17
5.2.70.0070.05311.27
5.2.60.0070.04311.14
5.2.50.0000.05011.00
5.2.40.0000.06011.09
5.2.30.0170.03710.97
5.2.20.0130.05311.13
5.2.10.0070.04010.84
5.2.00.0070.04010.56
5.1.60.0070.03010.04
5.1.50.0030.04310.04
5.1.40.0030.0339.98
5.1.30.0030.03710.34
5.1.20.0030.05710.44
5.1.10.0030.03710.13
5.1.00.0000.04010.08
5.0.50.0030.0338.75
5.0.40.0000.0308.51
5.0.30.0000.0638.19
5.0.20.0070.0378.16
5.0.10.0070.0238.25
5.0.00.0070.0438.23
4.4.90.0030.0276.82
4.4.80.0070.0206.82
4.4.70.0000.0306.82
4.4.60.0070.0276.82
4.4.50.0000.0236.82
4.4.40.0000.0376.82
4.4.30.0030.0276.82
4.4.20.0070.0236.82
4.4.10.0030.0206.82
4.4.00.0000.0376.82
4.3.110.0000.0306.82
4.3.100.0030.0276.82
4.3.90.0030.0306.82
4.3.80.0030.0336.82
4.3.70.0030.0206.82
4.3.60.0070.0176.82
4.3.50.0070.0276.82
4.3.40.0030.0336.82
4.3.30.0030.0276.82
4.3.20.0070.0276.82
4.3.10.0070.0236.82
4.3.00.0070.0236.48

preferences:
65.86 ms | 401 KiB | 5 Q