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 = $v; // 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.0070.01418.68
8.3.50.0100.00521.14
8.3.40.0140.00718.80
8.3.30.0070.00720.35
8.3.20.0070.00020.51
8.3.10.0090.00022.09
8.3.00.0040.00422.39
8.2.180.0030.01316.75
8.2.170.0070.00722.96
8.2.160.0100.00320.45
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0140.00426.16
8.2.120.0110.00017.91
8.2.110.0050.00522.26
8.2.100.0080.00419.21
8.2.90.0000.00819.08
8.2.80.0030.00619.21
8.2.70.0060.00317.61
8.2.60.0030.00618.05
8.2.50.0090.00018.07
8.2.40.0030.00618.09
8.2.30.0030.00617.98
8.2.20.0060.00317.61
8.2.10.0040.00417.81
8.2.00.0000.00817.69
8.1.280.0150.00625.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00324.04
8.1.230.0040.00718.72
8.1.220.0000.00817.75
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0030.00617.52
8.1.180.0000.00819.01
8.1.170.0060.00318.52
8.1.160.0050.00222.09
8.1.150.0070.00018.55
8.1.140.0000.00717.43
8.1.130.0030.00317.88
8.1.120.0040.00417.42
8.1.110.0040.00417.38
8.1.100.0000.00717.30
8.1.90.0040.00417.40
8.1.80.0000.00817.40
8.1.70.0020.00517.30
8.1.60.0040.00417.58
8.1.50.0000.00817.42
8.1.40.0040.00417.51
8.1.30.0040.00417.68
8.1.20.0030.00517.68
8.1.10.0040.00417.57
8.1.00.0040.00417.48
8.0.300.0040.00418.77
8.0.290.0070.00017.04
8.0.280.0040.00418.40
8.0.270.0070.00017.13
8.0.260.0000.00616.75
8.0.250.0000.00716.96
8.0.240.0070.00016.86
8.0.230.0000.00716.86
8.0.220.0040.00416.91
8.0.210.0030.00316.93
8.0.200.0030.00317.00
8.0.190.0030.00716.94
8.0.180.0000.00816.93
8.0.170.0030.00516.83
8.0.160.0030.00316.91
8.0.150.0050.00216.89
8.0.140.0050.00316.85
8.0.130.0000.00613.38
8.0.120.0040.00416.94
8.0.110.0040.00416.93
8.0.100.0040.00416.87
8.0.90.0000.00816.73
8.0.80.0070.00716.89
8.0.70.0040.00416.89
8.0.60.0000.00716.85
8.0.50.0070.00016.90
8.0.30.0110.01217.08
8.0.20.0110.01117.40
8.0.10.0040.00416.88
8.0.00.0100.00716.75
7.4.330.0000.00515.00
7.4.320.0030.00316.55
7.4.300.0030.00316.52
7.4.290.0070.00316.53
7.4.280.0070.00016.43
7.4.270.0000.00716.42
7.4.260.0000.00716.50
7.4.250.0000.00716.55
7.4.240.0040.00316.51
7.4.230.0030.00316.65
7.4.220.0060.00916.46
7.4.210.0050.00916.60
7.4.200.0000.00716.68
7.4.190.0030.00316.65
7.4.160.0120.00316.41
7.4.150.0130.00917.40
7.4.140.0060.01317.86
7.4.130.0070.01016.58
7.4.120.0120.00716.55
7.4.110.0110.00616.59
7.4.100.0110.00716.63
7.4.90.0080.01116.39
7.4.80.0030.01719.39
7.4.70.0040.01516.57
7.4.60.0130.00616.48
7.4.50.0020.00216.47
7.4.40.0030.01322.77
7.4.30.0090.00916.83
7.4.00.0030.00615.16
7.3.330.0000.00613.43
7.3.320.0030.00313.31
7.3.310.0050.00316.32
7.3.300.0030.00316.39
7.3.290.0070.01316.30
7.3.280.0080.00716.32
7.3.270.0100.00617.40
7.3.260.0150.00316.38
7.3.250.0140.00616.54
7.3.240.0090.00916.34
7.3.230.0090.00916.49
7.3.210.0110.00616.51
7.3.200.0150.00619.39
7.3.190.0110.00816.30
7.3.180.0110.00716.50
7.3.170.0030.01216.36
7.3.160.0080.00916.27
7.3.120.0030.01214.75
7.3.110.0060.00914.46
7.3.100.0070.00714.70
7.3.90.0070.01114.82
7.3.80.0070.00714.81
7.3.70.0120.00314.88
7.3.60.0080.00614.73
7.3.50.0060.00614.87
7.3.40.0030.00614.84
7.3.30.0110.00414.60
7.3.20.0030.01416.74
7.3.10.0080.00816.65
7.3.00.0070.00716.77
7.2.330.0120.00616.64
7.2.320.0040.02016.42
7.2.310.0060.01216.79
7.2.300.0100.00616.70
7.2.290.0170.00016.83
7.2.240.0030.01314.98
7.2.230.0000.01215.12
7.2.220.0060.00915.02
7.2.210.0000.01615.16
7.2.200.0090.00614.95
7.2.190.0070.00715.07
7.2.180.0060.00915.03
7.2.170.0100.00715.05
7.2.160.0070.00715.04
7.2.150.0070.00416.99
7.2.140.0080.00817.00
7.2.130.0070.00716.71
7.2.120.0090.00616.79
7.2.110.0070.01016.71
7.2.100.0070.01016.91
7.2.90.0070.00717.16
7.2.80.0040.00716.88
7.2.70.0070.00716.82
7.2.60.0010.01216.62
7.2.50.0070.01117.08
7.2.40.0060.01016.50
7.2.30.0040.00817.08
7.2.20.0070.00716.84
7.2.10.0100.00716.99
7.2.00.0000.01116.71
7.1.330.0000.01015.80
7.1.320.0030.00915.81
7.1.310.0040.01115.74
7.1.300.0130.00315.92
7.1.290.0030.01115.61
7.1.280.0100.00315.70
7.1.270.0040.01115.54
7.1.260.0030.01015.57
7.1.250.0030.00915.46
7.1.200.0100.00815.38
7.1.70.0070.00317.20
7.1.60.0130.01019.43
7.1.50.0030.02016.88
7.1.00.0030.05022.31
7.0.200.0000.00716.59
7.0.140.0030.07722.01
7.0.60.0070.06720.05
7.0.50.0030.04317.89
7.0.40.0070.09020.15
7.0.30.0100.05020.15
7.0.20.0200.06320.12
7.0.10.0100.08320.34
7.0.00.0100.08720.07
5.6.280.0000.07721.09
5.6.210.0070.09020.70
5.6.200.0030.08718.18
5.6.190.0070.08720.49
5.6.180.0330.07720.64
5.6.170.0270.08020.47
5.6.160.0100.06320.47
5.6.150.0030.06018.23
5.6.140.0070.03718.15
5.6.130.0130.04018.18
5.6.120.0030.04720.98
5.6.110.0130.06321.14
5.6.100.0070.08720.89
5.6.90.0070.08320.96
5.6.80.0100.07320.41
5.6.70.4400.03720.53
5.5.350.0070.04720.43
5.5.340.0070.07018.09
5.5.330.0030.04320.21
5.5.320.0070.04320.34
5.5.310.0270.08320.41
5.5.300.0070.03717.94
5.5.290.0100.07718.08
5.5.280.0030.05320.91
5.5.270.0030.04720.94
5.5.260.0070.08020.76
5.5.250.0030.08020.46
5.5.240.0270.03720.19
5.4.450.0200.05019.59
5.4.440.0200.06019.61
5.4.430.0370.05019.46
5.4.420.0370.04019.70
5.4.410.0170.07319.35
5.4.400.0430.04718.82
5.4.390.0400.06018.50
5.4.380.0170.06318.57
5.4.370.0130.05318.75
5.4.360.0170.04718.84
5.4.350.0070.03912.02
5.4.340.0060.04312.02
5.4.320.0060.03712.50
5.4.310.0050.03812.50
5.4.300.0070.04112.50
5.4.290.0080.04512.50
5.4.280.0050.03712.40
5.4.270.0070.04212.39
5.4.260.0040.03912.40
5.4.250.0070.06018.72
5.4.240.0030.06018.93
5.4.230.0030.05718.63
5.4.220.0030.07318.80
5.4.210.0070.05318.91
5.4.200.0100.04718.79
5.4.190.0170.06318.96
5.4.180.0030.05718.78
5.4.170.0070.05318.98
5.4.160.0170.04718.76
5.4.150.0230.04319.06
5.4.140.0030.05316.42
5.4.130.0030.06316.59
5.4.120.0130.04316.35
5.4.110.0200.04316.39
5.4.100.0130.04316.55
5.4.90.0100.05716.39
5.4.80.0170.06016.32
5.4.70.0030.06716.48
5.4.60.0070.05716.52
5.4.50.0070.05016.37
5.4.40.0070.04716.52
5.4.30.0170.04016.37
5.4.20.0070.06016.39
5.4.10.0030.05316.50
5.4.00.0030.06015.80
5.3.290.0060.05012.80
5.3.280.0100.04714.73
5.3.270.0030.06714.59
5.3.260.0100.05014.67
5.3.250.0100.04714.68
5.3.240.0070.07014.70
5.3.230.0170.06314.78
5.3.220.0070.06314.56
5.3.210.0100.07314.48
5.3.200.0100.06714.59
5.3.190.0030.06314.65
5.3.180.0130.06014.79
5.3.170.0030.06314.65
5.3.160.0100.05014.63
5.3.150.0070.05314.54
5.3.140.0100.06314.73
5.3.130.0100.07714.69
5.3.120.0170.04314.64
5.3.110.0170.05314.54
5.3.100.0100.05714.21
5.3.90.0100.07014.10
5.3.80.0070.05014.00
5.3.70.0030.05314.11
5.3.60.0070.05014.07
5.3.50.0070.05014.04
5.3.40.0170.04313.78
5.3.30.0100.06313.98
5.3.20.0100.04313.88
5.3.10.0100.05313.73
5.3.00.0100.04313.47
5.2.170.0070.04011.12
5.2.160.0100.03711.12
5.2.150.0100.04011.14
5.2.140.0070.04011.23
5.2.130.0070.04011.20
5.2.120.0000.04311.18
5.2.110.0070.04011.09
5.2.100.0070.04011.20
5.2.90.0030.04010.94
5.2.80.0070.04711.17
5.2.70.0000.04311.17
5.2.60.0030.04311.14
5.2.50.0100.05311.10
5.2.40.0000.04311.01
5.2.30.0030.04310.98
5.2.20.0030.04011.13
5.2.10.0030.04010.87
5.2.00.0100.03710.70
5.1.60.0100.02710.24
5.1.50.0030.03710.09
5.1.40.0100.02710.04
5.1.30.0070.04710.42
5.1.20.0000.05310.42
5.1.10.0070.03310.07
5.1.00.0130.03310.14
5.0.50.0070.0278.61
5.0.40.0070.0238.52
5.0.30.0000.0478.46
5.0.20.0030.0278.29
5.0.10.0000.0338.25
5.0.00.0000.0438.21
4.4.90.0000.0237.34
4.4.80.0000.0237.34
4.4.70.0000.0237.34
4.4.60.0100.0177.34
4.4.50.0000.0237.34
4.4.40.0000.0477.34
4.4.30.0070.0277.34
4.4.20.0000.0237.34
4.4.10.0030.0207.34
4.4.00.0100.0237.34
4.3.110.0070.0307.34
4.3.100.0070.0177.34
4.3.90.0000.0207.34
4.3.80.0030.0337.34
4.3.70.0030.0207.34
4.3.60.0000.0307.34
4.3.50.0000.0237.34
4.3.40.0130.0337.34
4.3.30.0000.0277.34
4.3.20.0030.0207.34
4.3.10.0000.0237.34
4.3.00.0130.0205.73

preferences:
73.17 ms | 401 KiB | 5 Q