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 class A{ function b(){ return function(){ return $this->secret; }; } } $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.0170.00318.68
8.3.50.0100.00522.12
8.3.40.0150.00018.82
8.3.30.0130.00319.21
8.3.20.0040.00420.12
8.3.10.0040.00421.92
8.3.00.0000.00822.51
8.2.180.0120.00616.75
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0120.00626.16
8.2.120.0040.00419.25
8.2.110.0070.00322.16
8.2.100.0060.00917.84
8.2.90.0050.00319.22
8.2.80.0060.00317.97
8.2.70.0050.00317.63
8.2.60.0030.00517.90
8.2.50.0060.00618.07
8.2.40.0040.00418.03
8.2.30.0000.01118.09
8.2.20.0050.00217.70
8.2.10.0040.00417.75
8.2.00.0040.00417.82
8.1.280.0190.00025.92
8.1.270.0000.00723.99
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0060.00323.88
8.1.230.0060.00619.04
8.1.220.0030.00517.74
8.1.210.0030.00518.77
8.1.200.0030.00617.23
8.1.190.0030.00517.54
8.1.180.0030.00618.10
8.1.170.0080.00018.46
8.1.160.0000.00821.97
8.1.150.0050.00318.70
8.1.140.0000.00817.37
8.1.130.0000.00717.85
8.1.120.0030.00517.41
8.1.110.0040.00417.43
8.1.100.0000.00717.39
8.1.90.0050.00317.43
8.1.80.0000.00717.48
8.1.70.0000.00717.34
8.1.60.0060.00317.61
8.1.50.0000.00717.44
8.1.40.0040.00417.58
8.1.30.0070.00017.65
8.1.20.0040.00417.58
8.1.10.0040.00417.46
8.1.00.0000.00817.50
8.0.300.0000.00718.77
8.0.290.0070.00017.05
8.0.280.0000.00718.40
8.0.270.0030.00317.22
8.0.260.0000.00716.89
8.0.250.0030.00316.96
8.0.240.0070.00016.99
8.0.230.0000.00816.96
8.0.220.0040.00416.91
8.0.210.0030.00316.89
8.0.200.0040.00416.88
8.0.190.0070.00016.94
8.0.180.0000.00716.95
8.0.170.0080.00016.90
8.0.160.0020.00516.90
8.0.150.0100.00016.84
8.0.140.0000.00716.91
8.0.130.0000.00513.32
8.0.120.0040.00416.92
8.0.110.0050.00316.87
8.0.100.0040.00416.77
8.0.90.0030.00316.79
8.0.80.0060.01216.95
8.0.70.0000.00716.79
8.0.60.0030.00316.96
8.0.50.0050.00216.86
8.0.30.0090.01217.16
8.0.20.0060.01217.40
8.0.10.0040.00417.01
8.0.00.0130.00716.56
7.4.330.0000.00615.20
7.4.320.0030.00316.48
7.4.300.0000.00616.55
7.4.290.0040.00216.55
7.4.280.0000.00716.52
7.4.270.0070.00016.44
7.4.260.0000.00716.66
7.4.250.0040.00416.47
7.4.240.0030.00416.49
7.4.230.0030.00316.52
7.4.220.0090.00916.47
7.4.210.0080.00916.49
7.4.200.0000.00716.65
7.4.190.0000.00716.64
7.4.160.0040.01216.48
7.4.150.0080.01117.40
7.4.140.0090.00917.86
7.4.130.0090.01016.65
7.4.120.0130.00716.57
7.4.110.0070.01116.45
7.4.100.0110.00716.53
7.4.90.0090.00916.64
7.4.80.0090.00919.39
7.4.70.0090.00616.59
7.4.60.0110.00716.52
7.4.50.0060.00016.42
7.4.40.0020.00822.77
7.4.30.0110.00516.59
7.4.00.0090.00315.10
7.3.330.0050.00013.48
7.3.320.0020.00213.43
7.3.310.0000.00716.54
7.3.300.0030.00316.44
7.3.290.0140.00616.45
7.3.280.0110.00716.41
7.3.270.0140.00717.40
7.3.260.0130.00316.40
7.3.250.0110.00716.47
7.3.240.0030.01316.60
7.3.230.0130.00316.55
7.3.210.0100.00716.39
7.3.200.0160.00319.39
7.3.190.0130.01016.54
7.3.180.0100.00616.43
7.3.170.0070.01016.49
7.3.160.0150.00016.55
7.3.120.0110.00715.12
7.3.10.0130.00316.66
7.3.00.0120.00516.69
7.2.330.0080.00816.89
7.2.320.0090.01516.80
7.2.310.0070.01016.57
7.2.300.0060.01216.86
7.2.290.0130.01016.59
7.2.130.0110.00316.94
7.2.120.0070.00316.99
7.2.110.0060.00717.05
7.2.100.0070.00416.96
7.2.90.0100.00716.96
7.2.80.0060.00416.86
7.2.70.0100.00416.88
7.2.60.0060.00816.86
7.2.50.0080.00716.91
7.2.40.0050.00616.94
7.2.30.0100.00316.94
7.2.20.0080.00317.01
7.2.10.0070.00816.91
7.2.00.0040.00717.81
7.1.250.0050.00715.80
7.1.200.0090.00615.80
7.1.100.0000.01018.29
7.1.70.0080.00316.91
7.1.60.0060.01919.82
7.1.50.0030.00716.63
7.1.00.0100.07022.31
7.0.200.0030.00616.68
7.0.140.0030.07022.15
7.0.110.0570.08320.02
7.0.100.0530.05020.07
7.0.90.0100.07719.98
7.0.80.0070.05319.98
7.0.70.0070.07719.95
7.0.60.0070.08019.93
7.0.50.0030.08019.96
7.0.40.0200.07019.86
7.0.30.0070.07019.73
7.0.20.0070.08319.72
7.0.10.0070.07719.78
7.0.00.0130.05019.65
5.6.280.0030.07021.08
5.6.260.0030.07720.60
5.6.250.0100.07320.90
5.6.240.0100.07020.59
5.6.230.0070.07720.55
5.6.220.0100.03720.63
5.6.210.0070.08020.69
5.6.200.0070.08320.87
5.6.190.0030.06020.72
5.6.180.0070.05020.57
5.6.170.0200.03320.70
5.6.160.0070.07320.47
5.6.150.0070.08020.57
5.6.140.0070.09020.60
5.6.130.0030.05020.56
5.6.120.0100.08020.81
5.6.110.0200.07320.64
5.6.100.0170.06020.55
5.6.90.0100.04320.70
5.6.80.0130.07320.01
5.6.70.0070.06320.00
5.6.60.0030.04319.94
5.6.50.0070.08019.86
5.6.40.0000.06720.02
5.6.30.0030.08720.04
5.6.20.0130.07320.01
5.6.10.0170.07019.92
5.6.00.0100.07319.92
5.5.380.0130.07317.57
5.5.370.0070.07317.70
5.5.360.0030.06017.58
5.5.350.0130.06717.62
5.5.340.0070.08018.09
5.5.330.0030.05718.11
5.5.320.0100.08018.25
5.5.310.0170.07017.91
5.5.300.0030.06018.09
5.5.290.0130.04717.89
5.5.280.0070.05018.25
5.5.270.0130.07018.07
5.5.260.0100.08017.92
5.5.250.0100.06317.91
5.5.240.0030.08017.48
5.5.230.0100.05317.63
5.5.220.0030.05017.60
5.5.210.0070.07017.45
5.5.200.0070.07317.58
5.5.190.0070.04717.28
5.5.180.0130.06717.44
5.5.160.0070.07017.58
5.5.150.0100.07717.43
5.5.140.0030.07717.48
5.5.130.0030.07317.31
5.5.120.0070.07317.26
5.5.110.0100.07717.47
5.5.100.0030.07717.18
5.5.90.0000.04017.07
5.5.80.0100.07317.16
5.5.70.0100.03017.47
5.5.60.0000.07317.36
5.5.50.0000.07717.37
5.5.40.0030.03317.17
5.5.30.0100.07317.29
5.5.20.0170.06317.16
5.5.10.0000.08717.14
5.5.00.0030.04717.19
5.4.450.0200.07019.33
5.4.440.0070.07719.66
5.4.430.0070.04719.64
5.4.420.0130.04719.50
5.4.410.0100.05319.20
5.4.400.0070.07319.02
5.4.390.0000.07319.22
5.4.380.0030.05019.26
5.4.370.0100.06718.98
5.4.360.0030.04719.17
5.4.350.0030.05019.25
5.4.340.0100.07018.99
5.4.320.0070.04719.03
5.4.310.0100.07719.14
5.4.300.0070.07019.31
5.4.290.0030.07719.00
5.4.280.0070.06019.13
5.4.270.0030.08019.18
5.4.260.0070.05019.30
5.4.250.0030.04019.00
5.4.240.0030.07719.31
5.4.230.0070.06319.16
5.4.220.0070.06319.23
5.4.210.0000.04019.01
5.4.200.0030.07719.33
5.4.190.0070.05319.16
5.4.180.0130.06719.34
5.4.170.0070.07719.15
5.4.160.0030.06718.99
5.4.150.0130.06018.97
5.4.140.0130.06316.56
5.4.130.0130.06316.40
5.4.120.0070.07716.44
5.4.110.0070.07316.46
5.4.100.0070.05016.52
5.4.90.0100.06316.50
5.4.80.0070.07016.32
5.4.70.0000.07016.54
5.4.60.0030.06016.55
5.4.50.0170.05316.39
5.4.40.0100.06716.39
5.4.30.0000.05316.55
5.4.20.0100.04716.48
5.4.10.0030.08016.46
5.4.00.0100.07016.03
5.3.290.0070.08014.71
5.3.280.0030.03714.75
5.3.270.0070.06714.60
5.3.260.0070.07714.69
5.3.250.0100.06014.84
5.3.240.0130.05714.63
5.3.230.0170.06314.84
5.3.220.0130.06014.58
5.3.210.0070.05314.71
5.3.200.0100.05014.57
5.3.190.0130.05314.59
5.3.180.0200.06314.43
5.3.170.0070.08014.56
5.3.160.0070.04014.53
5.3.150.0030.03714.55
5.3.140.0130.06714.54
5.3.130.0100.07014.68
5.3.120.0070.07314.70
5.3.110.0030.04314.52
5.3.100.0070.04714.00
5.3.90.0030.04314.11
5.3.80.0070.07314.02
5.3.70.0030.08014.10
5.3.60.0070.04014.11
5.3.50.0070.05313.96
5.3.40.0100.05714.02
5.3.30.0100.06314.06
5.3.20.0130.05713.70
5.3.10.0200.05013.64
5.3.00.0000.07713.65
5.2.170.0030.06312.11
5.2.160.0170.04712.11
5.2.150.0030.06312.11
5.2.140.0070.06012.11
5.2.130.0030.03012.11
5.2.120.0070.06012.11
5.2.110.0030.06312.11
5.2.100.0030.03312.11
5.2.90.0000.03312.11
5.2.80.0070.05312.11
5.2.70.0070.04312.11
5.2.60.0030.04712.11
5.2.50.0130.05312.11
5.2.40.0030.03312.11
5.2.30.0030.04712.11
5.2.20.0070.05012.11
5.2.10.0030.06712.11
5.2.00.0030.06012.11
5.1.60.0070.02012.11
5.1.50.0000.05712.11
5.1.40.0100.04312.11
5.1.30.0030.06012.11
5.1.20.0000.06012.11
5.1.10.0100.04712.11
5.1.00.0030.02012.11
5.0.50.0000.05012.11
5.0.40.0030.02312.11
5.0.30.0000.06712.11
5.0.20.0030.03012.11
5.0.10.0000.02012.11
5.0.00.0000.03312.11
4.4.90.0070.01312.11
4.4.80.0030.02012.11
4.4.70.0030.02712.11
4.4.60.0000.01312.11
4.4.50.0030.01312.11
4.4.40.0000.04712.11
4.4.30.0030.03712.11
4.4.20.0070.01012.11
4.4.10.0000.03012.11
4.4.00.0030.05312.11
4.3.110.0000.01312.11
4.3.100.0000.03312.11
4.3.90.0000.01712.11
4.3.80.0030.04312.11
4.3.70.0030.03712.11
4.3.60.0100.02712.11
4.3.50.0030.03012.11
4.3.40.0030.04712.11
4.3.30.0000.04012.11
4.3.20.0000.02712.11
4.3.10.0000.01312.11
4.3.00.0000.01712.11

preferences:
40.03 ms | 401 KiB | 5 Q