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 new $this; }; } } $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.0160.00318.21
8.3.50.0160.00522.05
8.3.40.0000.01518.63
8.3.30.0090.00619.01
8.3.20.0000.00820.20
8.3.10.0080.00021.91
8.3.00.0080.00022.09
8.2.180.0110.01116.63
8.2.170.0090.00622.96
8.2.160.0150.00020.53
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0080.00019.48
8.2.110.0000.00922.02
8.2.100.0080.00419.26
8.2.90.0040.00419.17
8.2.80.0000.00818.00
8.2.70.0050.00317.50
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0040.00418.09
8.2.30.0070.00418.06
8.2.20.0050.00217.73
8.2.10.0040.00417.76
8.2.00.0000.00817.75
8.1.280.0070.01125.92
8.1.270.0040.00422.04
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0090.00023.88
8.1.230.0060.00619.11
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0100.00017.23
8.1.190.0000.00817.53
8.1.180.0080.00018.10
8.1.170.0050.00318.72
8.1.160.0050.00321.85
8.1.150.0070.00018.55
8.1.140.0040.00417.32
8.1.130.0000.00717.81
8.1.120.0000.00717.30
8.1.110.0000.00717.42
8.1.100.0030.00317.32
8.1.90.0030.00417.34
8.1.80.0000.00717.30
8.1.70.0000.00717.42
8.1.60.0030.00617.66
8.1.50.0040.00417.47
8.1.40.0000.00717.48
8.1.30.0000.00717.63
8.1.20.0000.00817.71
8.1.10.0040.00417.60
8.1.00.0000.00817.49
8.0.300.0000.00718.77
8.0.290.0070.00017.03
8.0.280.0030.00318.40
8.0.270.0040.00317.26
8.0.260.0000.00716.85
8.0.250.0040.00416.88
8.0.240.0040.00416.87
8.0.230.0040.00416.89
8.0.220.0000.00716.89
8.0.210.0070.00016.87
8.0.200.0090.00016.99
8.0.190.0000.00716.96
8.0.180.0050.00216.87
8.0.170.0040.00416.92
8.0.160.0040.00416.80
8.0.150.0050.00216.79
8.0.140.0000.00716.77
8.0.130.0000.00613.36
8.0.120.0050.00316.90
8.0.110.0000.00716.92
8.0.100.0080.00016.97
8.0.90.0000.00716.74
8.0.80.0120.00316.98
8.0.70.0050.00216.87
8.0.60.0070.00016.79
8.0.50.0040.00416.74
8.0.30.0120.00817.10
8.0.20.0080.01117.40
8.0.10.0000.00716.87
8.0.00.0090.01016.84
7.4.330.0000.00515.14
7.4.320.0000.00616.63
7.4.300.0060.00016.54
7.4.290.0030.00316.49
7.4.280.0000.00816.66
7.4.270.0000.00716.53
7.4.260.0000.00716.64
7.4.250.0000.00716.54
7.4.240.0030.00416.54
7.4.230.0000.00716.61
7.4.220.0000.01916.53
7.4.210.0110.00616.64
7.4.200.0030.00316.46
7.4.190.0030.00316.79
7.4.160.0120.00616.65
7.4.150.0070.01117.40
7.4.140.0110.00817.86
7.4.130.0120.00516.50
7.4.120.0130.00416.55
7.4.110.0140.00816.52
7.4.100.0070.01016.57
7.4.90.0100.00716.46
7.4.80.0100.01019.39
7.4.70.0100.00716.61
7.4.60.0070.01016.50
7.4.50.0040.00016.45
7.4.40.0070.00722.77
7.4.30.0100.00616.78
7.4.00.0070.00715.12
7.3.330.0000.00613.22
7.3.320.0060.00013.51
7.3.310.0000.00716.48
7.3.300.0060.00016.43
7.3.290.0040.01116.50
7.3.280.0080.00916.40
7.3.270.0100.00717.40
7.3.260.0120.00616.59
7.3.250.0060.01116.56
7.3.240.0060.01116.66
7.3.230.0030.01316.66
7.3.210.0070.01016.46
7.3.200.0100.01319.39
7.3.190.0050.01416.63
7.3.180.0060.00916.61
7.3.170.0140.00516.49
7.3.160.0030.01316.56
7.3.120.0070.01014.85
7.3.10.0070.00516.46
7.3.00.0030.01216.53
7.2.330.0170.00016.44
7.2.320.0060.01616.92
7.2.310.0070.01016.68
7.2.300.0200.00316.54
7.2.290.0070.01016.70
7.2.130.0020.00816.83
7.2.120.0030.01016.78
7.2.110.0060.00716.65
7.2.100.0100.00516.81
7.2.90.0060.00616.99
7.2.80.0090.00416.74
7.2.70.0060.00516.85
7.2.60.0100.00916.94
7.2.50.0030.01016.83
7.2.40.0140.00416.86
7.2.30.0100.00316.59
7.2.20.0060.01116.92
7.2.10.0090.00816.84
7.2.00.0030.01217.63
7.1.250.0030.01115.65
7.1.200.0050.00515.55
7.1.100.0070.00417.83
7.1.70.0000.01016.98
7.1.60.0060.00619.82
7.1.50.0090.00317.00
7.1.00.0000.08022.24
7.0.200.0070.00716.70
7.0.140.0000.07322.00
7.0.60.0000.04719.88
7.0.50.0100.08017.88
7.0.40.0070.08720.02
7.0.30.0370.07320.30
7.0.20.0230.06720.05
7.0.10.0230.04020.15
7.0.00.0200.06320.10
5.6.280.0030.07020.89
5.6.210.0170.07720.70
5.6.200.0130.08318.15
5.6.190.0100.07020.47
5.6.180.3700.03720.64
5.6.170.0270.07720.56
5.6.160.0100.08320.50
5.6.150.0070.04718.16
5.6.140.0030.04718.16
5.6.130.0030.04718.28
5.6.120.0170.07320.99
5.6.110.0130.08321.11
5.6.100.0100.08020.90
5.6.90.0070.07721.09
5.6.80.0070.06720.42
5.6.70.0200.03720.53
5.5.350.0070.07720.36
5.5.340.0100.08017.97
5.5.330.0070.04020.27
5.5.320.0130.05020.27
5.5.310.0330.07320.38
5.5.300.0100.08017.98
5.5.290.0030.08717.95
5.5.280.0130.07320.82
5.5.270.0070.04320.81
5.5.260.0170.07320.74
5.5.250.0130.05720.63
5.5.240.0000.05320.09
5.4.450.0030.06319.35
5.4.440.0630.06319.61
5.4.430.0130.07719.41
5.4.420.0130.05719.36
5.4.410.0170.05019.27
5.4.400.0830.00018.77
5.4.390.0770.00018.57
5.4.380.0330.04718.79
5.4.370.0200.05018.79
5.4.360.0230.05018.61
5.4.350.0170.05318.77
5.4.340.0100.05718.54
5.4.320.0090.03512.51
5.4.310.0100.04312.51
5.4.300.0110.04812.52
5.4.290.0060.04012.50
5.4.280.0070.03512.40
5.4.270.0170.05718.93
5.4.260.0030.07018.84
5.4.250.0070.05318.80
5.4.240.0100.07318.66
5.4.230.0100.06018.75
5.4.220.0070.05718.88
5.4.210.0130.05018.96
5.4.200.0100.07018.99
5.4.190.0230.05018.96
5.4.180.0130.07318.95
5.4.170.0170.05718.77
5.4.160.0200.06718.64
5.4.150.0100.07318.75
5.4.140.0100.07316.66
5.4.130.0170.04716.60
5.4.120.0030.05716.55
5.4.110.0170.06316.52
5.4.100.0100.06016.47
5.4.90.0130.07316.41
5.4.80.0070.05016.45
5.4.70.0130.07316.50
5.4.60.0100.07016.35
5.4.50.0070.05716.50
5.4.40.0130.05016.56
5.4.30.0070.05016.34
5.4.20.0130.05316.44
5.4.10.0270.04316.35
5.4.00.0100.07315.85
5.3.290.0050.04312.80
5.3.280.0100.05014.69
5.3.270.0170.07714.64
5.3.260.0230.05714.61
5.3.250.0100.05014.61
5.3.240.0030.08014.70
5.3.230.0130.06714.67
5.3.220.0130.04714.74
5.3.210.0100.08014.66
5.3.200.0000.06014.67
5.3.190.0200.06314.69
5.3.180.0130.07014.66
5.3.170.0030.05714.58
5.3.160.0100.07714.64
5.3.150.0130.07014.59
5.3.140.0070.05014.56
5.3.130.0070.06014.58
5.3.120.0170.05314.63
5.3.110.0100.06314.39
5.3.100.0030.05314.21
5.3.90.0200.05014.21
5.3.80.0100.04714.10
5.3.70.0100.05714.19
5.3.60.0100.05313.91
5.3.50.0070.05314.03
5.3.40.0070.07314.04
5.3.30.0070.07313.82
5.3.20.0030.06013.79
5.3.10.0030.06313.74
5.3.00.0100.04713.80
5.2.170.0100.04311.32
5.2.160.0030.06711.05
5.2.150.0100.05311.13
5.2.140.0030.04711.23
5.2.130.0100.05311.28
5.2.120.0230.04311.18
5.2.110.0170.03311.28
5.2.100.0070.05711.11
5.2.90.0200.03711.30
5.2.80.0030.04311.18
5.2.70.0030.06011.08
5.2.60.0130.04711.14
5.2.50.0030.04710.93
5.2.40.0100.05010.95
5.2.30.0130.04011.05
5.2.20.0030.04310.79
5.2.10.0100.04010.84
5.2.00.0170.04710.56
5.1.60.0070.03010.10
5.1.50.0100.04010.00
5.1.40.0070.0339.96
5.1.30.0000.05710.33
5.1.20.0070.03710.33
5.1.10.0130.03010.23
5.1.00.0130.03310.14
5.0.50.0030.0308.49
5.0.40.0100.0238.25
5.0.30.0070.0438.42
5.0.20.0070.0278.24
5.0.10.0070.0408.10
5.0.00.0000.0608.14
4.4.90.0000.0236.75
4.4.80.0030.0206.75
4.4.70.0070.0276.75
4.4.60.0000.0306.75
4.4.50.0070.0276.76
4.4.40.0070.0336.75
4.4.30.0100.0236.75
4.4.20.0100.0206.75
4.4.10.0000.0276.76
4.4.00.0070.0336.76
4.3.110.0070.0236.76
4.3.100.0000.0236.76
4.3.90.0070.0206.76
4.3.80.0070.0606.76
4.3.70.0030.0306.76
4.3.60.0100.0176.76
4.3.50.0000.0336.76
4.3.40.0070.0336.76
4.3.30.0030.0236.76
4.3.20.0000.0276.76
4.3.10.0000.0276.76
4.3.00.0100.0236.44

preferences:
45.53 ms | 401 KiB | 5 Q