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 = '10'; // 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.0040.01118.43
8.3.50.0110.00721.15
8.3.40.0090.00618.76
8.3.30.0100.00320.25
8.3.20.0080.00020.04
8.3.10.0050.00321.95
8.3.00.0040.00422.42
8.2.180.0100.00716.88
8.2.170.0070.00722.96
8.2.160.0040.01120.52
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0100.00326.16
8.2.120.0120.00017.77
8.2.110.0090.00022.11
8.2.100.0070.00419.41
8.2.90.0040.00419.05
8.2.80.0000.00819.39
8.2.70.0060.00317.63
8.2.60.0050.00217.80
8.2.50.0050.00518.07
8.2.40.0090.00018.34
8.2.30.0000.00818.04
8.2.20.0000.00717.71
8.2.10.0050.00217.65
8.2.00.0060.00317.85
8.1.280.0170.00325.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0030.00623.82
8.1.230.0040.00719.10
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0080.00417.25
8.1.190.0050.00317.55
8.1.180.0040.00419.13
8.1.170.0040.00418.57
8.1.160.0000.00722.12
8.1.150.0000.00718.55
8.1.140.0000.00717.39
8.1.130.0030.00317.88
8.1.120.0040.00317.47
8.1.110.0000.00717.40
8.1.100.0030.00517.39
8.1.90.0000.00717.39
8.1.80.0040.00417.45
8.1.70.0030.00317.38
8.1.60.0040.00417.60
8.1.50.0070.00017.46
8.1.40.0000.00817.57
8.1.30.0030.00617.64
8.1.20.0000.00817.56
8.1.10.0040.00417.60
8.1.00.0000.00817.45
8.0.300.0060.00318.77
8.0.290.0000.00717.05
8.0.280.0030.00318.39
8.0.270.0000.00717.14
8.0.260.0030.00316.83
8.0.250.0000.00716.96
8.0.240.0040.00416.99
8.0.230.0030.00316.95
8.0.220.0000.00716.95
8.0.210.0000.00716.79
8.0.200.0030.00316.93
8.0.190.0080.00416.98
8.0.180.0000.00716.83
8.0.170.0040.00416.90
8.0.160.0070.00016.88
8.0.150.0020.00516.76
8.0.140.0000.00716.91
8.0.130.0030.00313.32
8.0.120.0040.00416.91
8.0.110.0000.00816.85
8.0.100.0000.00717.00
8.0.90.0070.00016.77
8.0.80.0040.01416.79
8.0.70.0040.00416.85
8.0.60.0000.00816.76
8.0.50.0000.00817.03
8.0.30.0100.01217.18
8.0.20.0140.00817.40
8.0.10.0030.00516.98
8.0.00.0070.01016.50
7.4.330.0020.00215.00
7.4.320.0030.00316.48
7.4.300.0030.00316.44
7.4.290.0090.00016.54
7.4.280.0030.00316.53
7.4.270.0030.00316.57
7.4.260.0000.00716.63
7.4.250.0040.00416.58
7.4.240.0020.00616.54
7.4.230.0000.00716.27
7.4.220.0040.01216.57
7.4.210.0070.00816.52
7.4.200.0040.00416.71
7.4.190.0000.00716.66
7.4.160.0060.00916.64
7.4.150.0070.01117.40
7.4.140.0130.00517.86
7.4.130.0100.00716.53
7.4.120.0030.01616.60
7.4.110.0070.01316.45
7.4.100.0130.00716.48
7.4.90.0120.00616.54
7.4.80.0060.01419.39
7.4.70.0110.01116.59
7.4.60.0090.00816.67
7.4.50.0030.00316.28
7.4.40.0040.01122.77
7.4.30.0100.00616.44
7.4.00.0070.00914.88
7.3.330.0000.00513.41
7.3.320.0050.00013.38
7.3.310.0000.00716.36
7.3.300.0030.00316.33
7.3.290.0070.00716.35
7.3.280.0070.01016.40
7.3.270.0140.00417.40
7.3.260.0090.00916.43
7.3.250.0130.00516.28
7.3.240.0150.00916.55
7.3.230.0110.00716.56
7.3.210.0070.01116.57
7.3.200.0130.00319.39
7.3.190.0140.01016.40
7.3.180.0030.01216.29
7.3.170.0000.01716.43
7.3.160.0130.00316.51
7.3.120.0090.00914.93
7.3.110.0060.01214.88
7.3.100.0000.01614.86
7.3.90.0000.01314.82
7.3.80.0070.00414.80
7.3.70.0030.00714.83
7.3.60.0000.01515.02
7.3.50.0070.00714.43
7.3.40.0030.00714.81
7.3.30.0070.00714.69
7.3.20.0000.01216.72
7.3.10.0070.00816.50
7.3.00.0080.00816.37
7.2.330.0040.01516.67
7.2.320.0150.00316.43
7.2.310.0150.00316.66
7.2.300.0050.01116.81
7.2.290.0060.01116.73
7.2.250.0030.01015.02
7.2.240.0040.01515.07
7.2.230.0080.00815.18
7.2.220.0050.00515.21
7.2.210.0030.01414.71
7.2.200.0040.00814.79
7.2.190.0070.00715.05
7.2.180.0030.00615.00
7.2.170.0060.00914.83
7.2.130.0160.00616.49
7.2.120.0100.00716.29
7.2.110.0040.01416.55
7.2.100.0070.00716.60
7.2.90.0090.01216.34
7.2.80.0170.01216.56
7.2.70.0100.01017.05
7.2.60.0110.01016.66
7.2.50.0320.00716.52
7.2.40.0230.00516.77
7.2.30.0220.00416.54
7.2.20.0230.00616.64
7.2.10.0120.00816.46
7.2.00.0080.01118.03
7.1.330.0070.00715.79
7.1.320.0060.00516.01
7.1.310.0130.00315.93
7.1.300.0030.00715.41
7.1.290.0110.00415.95
7.1.280.0110.00315.76
7.1.270.0030.00615.57
7.1.260.0030.00615.89
7.1.250.0080.00815.70
7.1.200.0060.00615.97
7.1.100.0040.00718.02
7.1.70.0000.01117.20
7.1.60.0100.01619.43
7.1.50.0040.02216.98
7.1.00.0100.04322.45
7.0.200.0040.00416.77
7.0.140.0030.07721.92
7.0.60.0100.08320.11
7.0.50.0070.03717.90
7.0.40.0070.05020.05
7.0.30.0130.05020.16
7.0.20.0370.07320.08
7.0.10.0100.04020.27
7.0.00.0170.07020.08
5.6.280.0000.07721.11
5.6.210.0130.07720.76
5.6.200.0030.06718.16
5.6.190.0070.08320.46
5.6.180.0170.04020.54
5.6.170.0270.03320.50
5.6.160.0000.05320.48
5.6.150.0030.04018.18
5.6.140.0100.08018.16
5.6.130.0130.03718.22
5.6.120.0100.03321.01
5.6.110.0000.04321.00
5.6.100.0070.07021.01
5.6.90.0100.09720.88
5.6.80.0130.07720.41
5.5.350.0170.03720.38
5.5.340.0070.07317.97
5.5.330.0130.04720.13
5.5.320.0270.05320.20
5.5.310.0270.04320.35
5.5.300.0000.08717.95
5.5.290.0030.06318.04
5.5.280.0100.04720.77
5.5.270.0100.05020.73
5.5.260.0070.08020.79
5.5.250.0070.03720.49
5.5.240.0130.04020.17
5.4.450.0570.06319.36
5.4.440.0170.06319.58
5.4.430.0400.04719.64
5.4.420.0170.05719.47
5.4.410.0100.05719.45
5.4.400.0370.05018.81
5.4.390.0270.06018.54
5.4.380.0270.05318.51
5.4.370.0170.05018.63
5.4.360.0070.06018.72
5.4.350.0050.03712.03
5.4.340.0060.04612.02
5.4.320.0100.05212.51
5.4.310.0050.03812.50
5.4.300.0040.03712.50
5.4.290.0070.03712.50
5.4.280.0100.03212.39
5.4.270.0060.03712.40
5.4.260.0070.04012.40
5.4.250.0170.04318.92
5.4.240.0100.06318.93
5.4.230.0100.05318.91
5.4.220.0070.05318.99
5.4.210.0100.05718.63
5.4.200.0030.05718.99
5.4.190.0130.07318.96
5.4.180.0130.06718.78
5.4.170.0100.05019.08
5.4.160.0170.05718.74
5.4.150.0070.06318.79
5.4.140.0300.04316.43
5.4.130.0070.06316.39
5.4.120.0170.06016.52
5.4.110.0130.07016.39
5.4.100.0070.05716.46
5.4.90.0100.04716.50
5.4.80.0100.06016.48
5.4.70.0070.05716.43
5.4.60.0100.06716.29
5.4.50.0100.05716.48
5.4.40.0100.04316.42
5.4.30.0030.05316.47
5.4.20.0030.05016.45
5.4.10.0170.04316.44
5.4.00.0030.05316.02
5.3.290.0020.04312.80
5.3.280.0030.06314.60
5.3.270.0030.06014.63
5.3.260.0100.05014.70
5.3.250.0030.05714.44
5.3.240.0070.05314.58
5.3.230.0100.05714.77
5.3.220.0000.05714.59
5.3.210.0100.06714.79
5.3.200.0100.05014.40
5.3.190.0070.06014.65
5.3.180.0030.06014.64
5.3.170.0070.06314.57
5.3.160.0130.06714.70
5.3.150.0070.06014.57
5.3.140.0070.05714.55
5.3.130.0130.04714.54
5.3.120.0100.05014.78
5.3.110.0130.05014.64
5.3.100.0070.05314.04
5.3.90.0100.06014.11
5.3.80.0070.05014.01
5.3.70.0030.05314.09
5.3.60.0030.05313.84
5.3.50.0030.05714.11
5.3.40.0070.05013.97
5.3.30.0030.05013.74
5.3.20.0270.05713.92
5.3.10.0000.05313.61
5.3.00.0030.06013.71
5.2.170.0130.03311.31
5.2.160.0100.03311.12
5.2.150.0000.04711.23
5.2.140.0070.04011.14
5.2.130.0030.04011.27
5.2.120.0030.04311.17
5.2.110.0070.04011.11
5.2.100.0100.03711.18
5.2.90.0100.03311.19
5.2.80.0070.04011.08
5.2.70.0070.03710.93
5.2.60.0170.03011.23
5.2.50.0030.04011.10
5.2.40.0030.04011.22
5.2.30.0000.04310.98
5.2.20.0070.03711.18
5.2.10.0030.04011.08
5.2.00.0100.03310.56
5.1.60.0000.04010.04
5.1.50.0070.0309.84
5.1.40.0000.03710.04
5.1.30.0030.05010.56
5.1.20.0070.03310.52
5.1.10.0070.0379.91
5.1.00.0070.03710.05
5.0.50.0100.0308.59
5.0.40.0030.0278.26
5.0.30.0070.0378.22
5.0.20.0100.0208.16
5.0.10.0070.0308.13
5.0.00.0030.0408.21
4.4.90.0000.0277.33
4.4.80.0030.0207.33
4.4.70.0070.0177.33
4.4.60.0000.0277.33
4.4.50.0000.0237.33
4.4.40.0100.0237.33
4.4.30.0030.0207.33
4.4.20.0000.0307.33
4.4.10.0000.0277.33
4.4.00.0030.0337.33
4.3.110.0030.0207.33
4.3.100.0100.0137.33
4.3.90.0000.0307.33
4.3.80.0070.0277.33
4.3.70.0100.0137.33
4.3.60.0030.0177.33
4.3.50.0070.0177.33
4.3.40.0000.0337.33
4.3.30.0070.0177.33
4.3.20.0070.0177.33
4.3.10.0000.0237.33
4.3.00.0070.0177.21

preferences:
39.95 ms | 401 KiB | 5 Q