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 $fn = function(){ return array(); }; $test->secret = array('a',$fn->bindTo($test)); // 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.0060.00918.55
8.3.50.0160.01122.03
8.3.40.0110.00318.79
8.3.30.0070.00719.23
8.3.20.0040.00420.42
8.3.10.0050.00322.10
8.3.00.0070.00022.38
8.2.180.0120.00616.63
8.2.170.0090.01222.96
8.2.160.0100.01020.57
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00726.16
8.2.120.0050.00319.61
8.2.110.0030.00622.11
8.2.100.0080.00319.70
8.2.90.0030.00619.20
8.2.80.0000.00918.03
8.2.70.0000.00917.75
8.2.60.0030.00618.05
8.2.50.0050.00518.07
8.2.40.0050.00318.28
8.2.30.0100.00018.07
8.2.20.0080.00017.73
8.2.10.0030.00517.70
8.2.00.0040.00419.63
8.1.280.0110.01125.92
8.1.270.0030.00622.02
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0080.00023.80
8.1.230.0080.00419.09
8.1.220.0000.00817.79
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0030.00517.55
8.1.180.0050.00318.10
8.1.170.0090.00018.59
8.1.160.0070.00022.03
8.1.150.0040.00418.59
8.1.140.0000.00917.52
8.1.130.0000.00717.76
8.1.120.0000.00717.38
8.1.110.0000.00817.37
8.1.100.0040.00417.36
8.1.90.0000.00717.33
8.1.80.0070.00017.50
8.1.70.0030.00317.47
8.1.60.0070.00317.50
8.1.50.0020.00517.55
8.1.40.0000.00817.59
8.1.30.0000.00717.71
8.1.20.0030.00617.68
8.1.10.0000.00717.58
8.1.00.0040.00417.54
8.0.300.0000.00718.77
8.0.290.0000.00717.05
8.0.280.0000.00718.46
8.0.270.0030.00317.28
8.0.260.0030.00316.84
8.0.250.0000.00817.05
8.0.240.0000.00717.02
8.0.230.0000.00716.98
8.0.220.0000.00816.88
8.0.210.0070.00016.85
8.0.200.0040.00417.03
8.0.190.0000.00817.02
8.0.180.0000.00816.89
8.0.170.0030.00617.04
8.0.160.0000.00716.91
8.0.150.0040.00416.89
8.0.140.0050.00216.93
8.0.130.0080.00013.36
8.0.120.0040.00416.84
8.0.110.0040.00416.95
8.0.100.0030.00516.76
8.0.90.0050.00316.93
8.0.80.0030.01316.94
8.0.70.0000.00716.95
8.0.60.0000.00716.91
8.0.50.0000.00816.91
8.0.30.0110.01017.13
8.0.20.0100.00917.41
8.0.10.0040.00417.18
8.0.00.0120.00616.93
7.4.330.0020.00215.18
7.4.320.0040.00416.48
7.4.300.0060.00016.47
7.4.290.0000.00716.59
7.4.280.0060.00016.43
7.4.270.0000.00616.63
7.4.260.0040.00416.48
7.4.250.0040.00416.38
7.4.240.0050.00216.59
7.4.230.0070.00016.64
7.4.220.0180.00916.46
7.4.210.0100.00916.63
7.4.200.0030.00316.41
7.4.190.0000.00816.50
7.4.160.0080.00816.56
7.4.150.0120.00617.40
7.4.140.0140.00817.86
7.4.130.0100.00916.50
7.4.120.0040.01316.49
7.4.110.0160.00416.43
7.4.100.0090.00916.33
7.4.90.0100.00716.52
7.4.80.0030.01619.39
7.4.70.0100.00616.70
7.4.60.0110.00616.60
7.4.50.0030.00516.64
7.4.40.0060.00922.77
7.4.30.0000.01616.36
7.4.00.0100.00615.18
7.3.330.0030.00313.41
7.3.320.0050.00013.40
7.3.310.0040.00416.55
7.3.300.0030.00516.45
7.3.290.0110.00416.43
7.3.280.0040.01216.38
7.3.270.0090.00917.40
7.3.260.0150.00416.67
7.3.250.0100.01116.63
7.3.240.0110.00616.48
7.3.230.0100.00616.39
7.3.210.0090.00616.36
7.3.200.0130.00719.39
7.3.190.0030.01416.44
7.3.180.0030.01316.43
7.3.170.0100.01316.40
7.3.160.0100.00716.57
7.3.120.0000.01514.88
7.2.330.0080.01516.66
7.2.320.0170.00516.77
7.2.310.0090.01316.60
7.2.300.0100.01316.40
7.2.290.0060.01016.70
7.2.60.0030.01016.92
7.2.00.0030.01319.14
7.1.200.0000.01015.80
7.1.100.0000.01118.09
7.1.70.0040.01117.14
7.1.60.0120.00919.82
7.1.50.0060.00616.94
7.1.00.0030.07722.29
7.0.200.0100.00316.86
7.0.140.0030.07022.01
7.0.60.0070.06719.96
7.0.50.0170.07017.88
7.0.40.0100.05320.27
7.0.30.0400.06720.20
7.0.20.0230.04720.16
7.0.10.0170.08320.33
7.0.00.0070.08720.09
5.6.280.0070.09021.05
5.6.210.0130.07720.66
5.6.200.0030.08018.13
5.6.190.0070.07320.48
5.6.180.3430.04020.52
5.6.170.0270.05720.45
5.6.160.0100.06720.55
5.6.150.0070.08318.18
5.6.140.0070.03718.15
5.6.130.0070.04018.17
5.6.120.0030.06720.90
5.6.110.0170.06020.99
5.6.100.0130.04720.99
5.6.90.0130.07020.98
5.6.80.0030.04020.37
5.6.70.0170.03320.50
5.5.350.0070.08020.42
5.5.340.0030.06017.95
5.5.330.0000.09020.25
5.5.320.0170.05720.26
5.5.310.0300.07720.32
5.5.300.0100.07717.98
5.5.290.0070.06317.95
5.5.280.0100.06320.86
5.5.270.0070.04720.80
5.5.260.0070.06720.66
5.5.250.0100.08020.79
5.5.240.0000.04020.20
5.4.450.0570.05019.53
5.4.440.0770.05319.70
5.4.430.0230.04019.53
5.4.420.0170.04719.54
5.4.410.0100.05019.21
5.4.400.1670.00018.82
5.4.390.0830.00018.47
5.4.380.0270.05018.71
5.4.370.0230.04718.48
5.4.360.0270.04018.84
5.4.350.0100.06318.51
5.4.340.0200.04718.54
5.4.320.0080.05312.51
5.4.310.0070.03712.50
5.4.300.0090.03412.50
5.4.290.0040.04112.50
5.4.280.0060.03412.40
5.4.270.0300.04718.98
5.4.260.0170.06718.99
5.4.250.0100.06019.08
5.4.240.0100.06018.94
5.4.230.0100.07718.74
5.4.220.0070.05719.08
5.4.210.0130.05719.09
5.4.200.0070.06018.75
5.4.190.0030.06318.83
5.4.180.0000.05718.94
5.4.170.0130.05018.83
5.4.160.0030.05718.73
5.4.150.0100.08019.08
5.4.140.0100.05016.44
5.4.130.0200.04016.54
5.4.120.0130.07016.36
5.4.110.0100.07016.52
5.4.100.0070.07716.51
5.4.90.0130.06716.43
5.4.80.0230.05016.34
5.4.70.0100.06016.46
5.4.60.0070.06016.35
5.4.50.0100.05716.35
5.4.40.0070.05016.35
5.4.30.0100.05016.46
5.4.20.0000.06316.45
5.4.10.0030.05316.47
5.4.00.0070.05715.91
5.3.290.0060.04412.80
5.3.280.0070.05314.70
5.3.270.0070.06314.60
5.3.260.0070.05314.77
5.3.250.0170.06714.79
5.3.240.0130.05314.84
5.3.230.0100.06014.70
5.3.220.0000.07314.54
5.3.210.0230.06014.40
5.3.200.0100.05014.55
5.3.190.0170.06714.56
5.3.180.0100.05014.73
5.3.170.0070.07314.75
5.3.160.0170.04314.55
5.3.150.0000.06014.64
5.3.140.0070.05314.65
5.3.130.0100.05714.70
5.3.120.0170.06714.56
5.3.110.0030.08014.72
5.3.100.0170.06314.01
5.3.90.0100.04714.20
5.3.80.0100.07314.09
5.3.70.0130.06013.93
5.3.60.0070.06713.91
5.3.50.0130.05014.04
5.3.40.0200.08013.78
5.3.30.0030.06013.99
5.3.20.0130.05313.77
5.3.10.0070.05013.74
5.3.00.0070.06013.63
5.2.170.0000.05711.13
5.2.160.0100.04011.22
5.2.150.0000.05711.22
5.2.140.0000.06011.11
5.2.130.0100.04711.07
5.2.120.0130.04711.17
5.2.110.0100.05311.32
5.2.100.0070.05711.16
5.2.90.0100.05711.10
5.2.80.0130.04311.05
5.2.70.0070.05011.31
5.2.60.0130.05311.05
5.2.50.0100.04311.00
5.2.40.0130.03711.08
5.2.30.0070.05711.15
5.2.20.0070.04011.05
5.2.10.0070.05710.94
5.2.00.0030.05310.90
5.1.60.0100.0309.91
5.1.50.0030.03710.09
5.1.40.0070.03310.22
5.1.30.0070.03310.41
5.1.20.0030.04010.42
5.1.10.0070.03710.13
5.1.00.0030.04010.08
5.0.50.0070.0378.61
5.0.40.0030.0308.46
5.0.30.0100.0538.19
5.0.20.0030.0338.25
5.0.10.0030.0278.09
5.0.00.0070.0438.22
4.4.90.0100.0276.74
4.4.80.0030.0306.74
4.4.70.0030.0336.74
4.4.60.0100.0236.74
4.4.50.0070.0176.74
4.4.40.0070.0306.74
4.4.30.0000.0236.74
4.4.20.0030.0206.74
4.4.10.0070.0306.74
4.4.00.0000.0406.74
4.3.110.0000.0306.74
4.3.100.0030.0306.74
4.3.90.0100.0276.74
4.3.80.0030.0306.74
4.3.70.0100.0206.74
4.3.60.0030.0306.74
4.3.50.0070.0276.74
4.3.40.0000.0436.74
4.3.30.0070.0206.74
4.3.20.0000.0276.74
4.3.10.0070.0276.74
4.3.00.0100.0206.44

preferences:
44.86 ms | 401 KiB | 5 Q