3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Challenge 1: Modify Test::$secret before it's output. Rules:: 1. No use of Reflection API / runkit extension 2. No stopping execution before Test::run() 3. No Exceptions or PHP errors / warnings notices allowed Hints: 1. Caesar 2. Magic methods 3. Requires a new feature of PHP 5.4 */ 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 $test->callback = array(); // 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.0000.01918.43
8.3.50.0140.00821.27
8.3.40.0060.00918.97
8.3.30.0080.00620.09
8.3.20.0040.00420.00
8.3.10.0080.00021.92
8.3.00.0080.00022.34
8.2.180.0000.01918.43
8.2.170.0080.00522.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0130.00626.16
8.2.120.0000.01017.91
8.2.110.0000.01121.04
8.2.100.0030.00917.83
8.2.90.0080.00019.23
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0000.00817.79
8.2.50.0100.00318.10
8.2.40.0100.00018.22
8.2.30.0030.00618.08
8.2.20.0070.00017.72
8.2.10.0040.00417.79
8.2.00.0040.00417.64
8.1.280.0060.00925.92
8.1.270.0000.00724.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0040.00423.79
8.1.230.0040.00717.71
8.1.220.0080.00017.79
8.1.210.0050.00518.77
8.1.200.0030.00617.22
8.1.190.0040.00417.23
8.1.180.0030.00618.10
8.1.170.0030.00518.45
8.1.160.0040.00422.15
8.1.150.0040.00418.51
8.1.140.0030.00517.36
8.1.130.0000.00717.85
8.1.120.0000.00717.30
8.1.110.0040.00417.30
8.1.100.0000.00717.37
8.1.90.0000.00717.38
8.1.80.0070.00017.29
8.1.70.0000.00717.31
8.1.60.0040.00417.52
8.1.50.0000.00717.45
8.1.40.0030.00517.49
8.1.30.0040.00417.59
8.1.20.0040.00417.50
8.1.10.0060.00317.58
8.1.00.0050.00317.53
8.0.300.0030.00618.77
8.0.290.0000.00816.63
8.0.280.0050.00318.31
8.0.270.0040.00417.21
8.0.260.0000.00816.71
8.0.250.0030.00316.99
8.0.240.0080.00016.95
8.0.230.0030.00316.92
8.0.220.0030.00316.79
8.0.210.0050.00316.80
8.0.200.0000.00716.90
8.0.190.0100.00016.99
8.0.180.0000.00816.85
8.0.170.0080.00016.79
8.0.160.0030.00317.02
8.0.150.0070.00016.71
8.0.140.0040.00416.71
8.0.130.0030.00313.32
8.0.120.0040.00416.78
8.0.110.0050.00316.91
8.0.100.0040.00416.72
8.0.90.0030.00516.92
8.0.80.0080.00816.86
8.0.70.0030.00516.76
8.0.60.0000.00816.88
8.0.50.0050.00316.71
8.0.30.0060.01217.15
8.0.20.0040.01517.40
8.0.10.0030.00616.90
8.0.00.0090.00816.85
7.4.330.0000.00615.00
7.4.320.0030.00316.56
7.4.300.0030.00316.62
7.4.290.0000.00816.53
7.4.280.0000.00616.49
7.4.270.0000.00616.61
7.4.260.0000.00716.60
7.4.250.0030.00516.46
7.4.240.0030.00316.59
7.4.230.0000.00716.50
7.4.220.0100.00716.57
7.4.210.0070.00816.59
7.4.200.0000.00716.61
7.4.190.0030.00316.49
7.4.160.0090.00616.60
7.4.150.0100.00717.40
7.4.140.0080.01017.86
7.4.130.0090.00716.57
7.4.120.0150.00616.44
7.4.110.0000.01716.51
7.4.100.0040.00416.46
7.4.90.0130.00316.45
7.4.80.0110.00719.39
7.4.70.0150.00316.57
7.4.60.0130.00316.49
7.4.50.0040.00416.52
7.4.40.0040.01122.77
7.4.30.0070.01016.64
7.4.00.0060.01114.90
7.3.330.0020.00213.36
7.3.320.0030.00313.24
7.3.310.0000.00616.45
7.3.300.0030.00316.29
7.3.290.0080.00616.45
7.3.280.0050.01016.37
7.3.270.0080.00817.40
7.3.260.0080.01516.68
7.3.250.0060.01416.26
7.3.240.0070.01016.34
7.3.230.0080.01616.39
7.3.210.0100.00716.39
7.3.200.0070.01319.39
7.3.190.0080.01416.34
7.3.180.0040.01216.20
7.3.170.0100.01016.51
7.3.160.0060.01016.60
7.3.120.0100.00714.83
7.2.330.0080.01216.64
7.2.320.0080.01616.34
7.2.310.0130.01016.70
7.2.300.0070.01016.71
7.2.290.0070.01016.73
7.2.60.0030.01216.52
7.2.00.0030.00919.48
7.1.200.0040.00415.88
7.1.100.0030.01317.92
7.1.70.0070.00317.20
7.1.60.0030.02119.43
7.1.50.0160.00834.70
7.1.00.0030.03322.49
7.0.200.0000.00716.38
7.0.140.0030.07722.15
7.0.60.0070.07319.95
7.0.50.0030.07317.89
7.0.40.0070.04720.24
7.0.30.0500.05320.17
7.0.20.0270.08320.08
7.0.10.0100.07320.21
7.0.00.0100.08020.10
5.6.280.0000.07321.13
5.6.210.0130.07320.57
5.6.200.0230.04718.16
5.6.190.0000.05020.52
5.6.180.0100.06020.77
5.6.170.0270.06020.55
5.6.160.0130.08320.65
5.6.150.0030.08318.16
5.6.140.0030.04018.28
5.6.130.0030.04318.18
5.6.120.0100.04021.02
5.6.110.0100.07721.02
5.6.100.0000.08721.04
5.6.90.0100.07321.11
5.6.80.0130.05720.51
5.6.70.0330.06320.43
5.5.350.0200.08020.47
5.5.340.0130.07318.13
5.5.330.0200.07720.57
5.5.320.0370.04020.25
5.5.310.0430.05720.27
5.5.300.0100.07717.93
5.5.290.0100.07318.02
5.5.280.0030.07320.68
5.5.270.0200.07720.98
5.5.260.0130.07720.87
5.5.250.0030.07720.78
5.5.240.0470.04720.15
5.4.450.0070.05719.55
5.4.440.0070.06019.46
5.4.430.0170.05719.54
5.4.420.0100.05719.37
5.4.410.0200.05719.14
5.4.400.0370.05718.84
5.4.390.0530.05718.48
5.4.380.0230.06018.50
5.4.370.0170.04318.78
5.4.360.0100.05718.73
5.4.350.0100.04312.02
5.4.340.0070.03912.02
5.4.320.0050.03712.51
5.4.310.0060.03712.50
5.4.300.0050.03712.51
5.4.290.0040.03912.50
5.4.280.0030.03812.40
5.4.270.0090.03812.39
5.4.260.0060.03712.40
5.4.250.0070.06718.96
5.4.240.0300.04019.09
5.4.230.0300.04718.65
5.4.220.0200.05018.96
5.4.210.0070.07018.98
5.4.200.0170.04718.93
5.4.190.0200.06318.91
5.4.180.0330.04718.95
5.4.170.0170.05718.96
5.4.160.0170.04718.92
5.4.150.0200.04318.98
5.4.140.0100.07016.37
5.4.130.0030.05716.42
5.4.120.0100.07016.53
5.4.110.0070.05316.39
5.4.100.0070.05016.43
5.4.90.0030.05016.50
5.4.80.0070.05016.34
5.4.70.0200.04016.60
5.4.60.0000.05716.49
5.4.50.0070.05016.62
5.4.40.0130.04316.41
5.4.30.0030.05316.49
5.4.20.0170.04716.39
5.4.10.0030.07716.38
5.4.00.0030.05015.99
5.3.290.0040.04012.80
5.3.280.0130.06314.78
5.3.270.0130.05014.52
5.3.260.0030.05714.83
5.3.250.0000.06014.58
5.3.240.0170.04714.58
5.3.230.0100.05014.78
5.3.220.0100.05014.40
5.3.210.0100.07314.66
5.3.200.0070.06314.67
5.3.190.0170.05014.56
5.3.180.0030.05314.65
5.3.170.0100.05014.57
5.3.160.0200.05014.75
5.3.150.0030.05714.59
5.3.140.0100.05314.70
5.3.130.0130.04714.52
5.3.120.0070.07014.64
5.3.110.0070.05314.63
5.3.100.0070.05714.22
5.3.90.0070.05313.99
5.3.80.0000.05713.93
5.3.70.0070.05013.99
5.3.60.0070.06714.07
5.3.50.0100.06713.95
5.3.40.0070.05313.94
5.3.30.0070.04714.00
5.3.20.0070.05713.70
5.3.10.0100.04713.72
5.3.00.0070.05713.82
5.2.170.0100.04711.21
5.2.160.0070.03711.22
5.2.150.0100.03711.14
5.2.140.0070.04311.36
5.2.130.0100.03711.09
5.2.120.0170.03711.09
5.2.110.0070.04311.17
5.2.100.0030.04711.01
5.2.90.0070.04711.19
5.2.80.0100.04311.07
5.2.70.0030.04011.09
5.2.60.0100.03711.13
5.2.50.0000.05011.03
5.2.40.0000.04310.91
5.2.30.0030.04310.97
5.2.20.0100.05711.05
5.2.10.0070.04010.77
5.2.00.0000.04710.80
5.1.60.0030.05310.16
5.1.50.0070.0309.97
5.1.40.0030.03310.22
5.1.30.0070.03310.43
5.1.20.0070.03710.31
5.1.10.0100.03710.14
5.1.00.0100.04310.08
5.0.50.0030.0308.61
5.0.40.0100.0208.66
5.0.30.0030.0438.19
5.0.20.0000.0338.04
5.0.10.0000.0338.38
5.0.00.0030.0408.41
4.4.90.0030.0206.95
4.4.80.0000.0236.95
4.4.70.0100.0176.95
4.4.60.0000.0236.95
4.4.50.0000.0236.95
4.4.40.0000.0376.95
4.4.30.0000.0236.95
4.4.20.0100.0137.34
4.4.10.0100.0137.34
4.4.00.0000.0337.34
4.3.110.0000.0237.34
4.3.100.0070.0277.34
4.3.90.0000.0237.34
4.3.80.0000.0337.34
4.3.70.0100.0237.34
4.3.60.0030.0207.34
4.3.50.0070.0207.34
4.3.40.0100.0277.34
4.3.30.0030.0207.34
4.3.20.0070.0177.34
4.3.10.0000.0307.34
4.3.00.0070.0177.23

preferences:
41.76 ms | 401 KiB | 5 Q