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->secret('Test me bro!'); // 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.0190.00318.30
8.3.50.0120.00521.14
8.3.40.0100.01018.69
8.3.30.0100.00620.34
8.3.20.0070.00020.34
8.3.10.0040.00422.09
8.3.00.0050.00322.46
8.2.180.0120.00316.63
8.2.170.0040.01122.96
8.2.160.0070.00720.47
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0050.00319.64
8.2.110.0070.00320.47
8.2.100.0110.00019.28
8.2.90.0000.00919.07
8.2.80.0000.00719.21
8.2.70.0060.00317.50
8.2.60.0040.00717.67
8.2.50.0040.00418.07
8.2.40.0000.00818.09
8.2.30.0080.00017.97
8.2.20.0040.00417.72
8.2.10.0060.00317.73
8.2.00.0000.00817.73
8.1.280.0110.00725.92
8.1.270.0030.00624.66
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00623.84
8.1.230.0040.00719.07
8.1.220.0050.00317.74
8.1.210.0000.00918.77
8.1.200.0030.00617.36
8.1.190.0040.00417.53
8.1.180.0070.00020.11
8.1.170.0050.00518.52
8.1.160.0020.00522.16
8.1.150.0040.00418.54
8.1.140.0040.00417.50
8.1.130.0030.00517.83
8.1.120.0020.00517.42
8.1.110.0030.00317.32
8.1.100.0050.00317.28
8.1.90.0040.00417.39
8.1.80.0040.00417.29
8.1.70.0000.00817.46
8.1.60.0060.00317.43
8.1.50.0030.00617.45
8.1.40.0000.00717.51
8.1.30.0080.00017.54
8.1.20.0060.00317.66
8.1.10.0000.00817.55
8.1.00.0030.00717.53
8.0.300.0050.00218.77
8.0.290.0000.00717.16
8.0.280.0070.00318.47
8.0.270.0040.00417.17
8.0.260.0030.00316.76
8.0.250.0080.00016.96
8.0.240.0060.00316.87
8.0.230.0030.00316.99
8.0.220.0040.00416.90
8.0.210.0040.00416.75
8.0.200.0000.00716.95
8.0.190.0030.00317.03
8.0.180.0000.01016.95
8.0.170.0040.00416.94
8.0.160.0040.00416.84
8.0.150.0000.00816.94
8.0.140.0040.00316.80
8.0.130.0060.00013.30
8.0.120.0040.00416.88
8.0.110.0070.00016.88
8.0.100.0000.00716.86
8.0.90.0030.00316.72
8.0.80.0100.01016.88
8.0.70.0040.00416.88
8.0.60.0000.00816.91
8.0.50.0000.00716.90
8.0.30.0110.00817.16
8.0.20.0100.00817.40
8.0.10.0030.00516.90
8.0.00.0090.01216.75
7.4.330.0040.00015.00
7.4.320.0000.00716.38
7.4.300.0000.00616.50
7.4.290.0070.00016.52
7.4.280.0070.00016.62
7.4.270.0070.00016.52
7.4.260.0030.00316.41
7.4.250.0030.00516.45
7.4.240.0070.00016.61
7.4.230.0050.00216.60
7.4.220.0190.00316.73
7.4.210.0080.00616.56
7.4.200.0040.00416.73
7.4.190.0000.00716.49
7.4.160.0060.01016.41
7.4.150.0070.01017.40
7.4.140.0150.00817.86
7.4.130.0070.00916.48
7.4.120.0120.00516.55
7.4.110.0130.00316.47
7.4.100.0130.01016.49
7.4.90.0060.01316.42
7.4.80.0090.00919.39
7.4.70.0150.00916.56
7.4.60.0140.00316.59
7.4.50.0030.00516.45
7.4.40.0000.01622.77
7.4.30.0000.01716.45
7.4.00.0070.00914.79
7.3.330.0000.00513.27
7.3.320.0020.00213.33
7.3.310.0000.00716.21
7.3.300.0030.00316.24
7.3.290.0030.01616.30
7.3.280.0060.00916.29
7.3.270.0140.00917.40
7.3.260.0100.00716.34
7.3.250.0130.00716.42
7.3.240.0060.01516.51
7.3.230.0070.01016.51
7.3.210.0100.00716.52
7.3.200.0120.01119.39
7.3.190.0160.00616.50
7.3.180.0100.00616.48
7.3.170.0070.01116.43
7.3.160.0100.00716.46
7.3.120.0050.00814.77
7.3.110.0120.00914.91
7.3.100.0070.00714.76
7.3.90.0040.01114.91
7.3.80.0100.00314.71
7.3.70.0100.00314.91
7.3.60.0000.00814.90
7.3.50.0090.00614.77
7.3.40.0000.00914.74
7.3.30.0040.01414.94
7.3.20.0090.00616.61
7.3.10.0060.00916.75
7.3.00.0070.00716.40
7.2.330.0120.00616.77
7.2.320.0080.00816.58
7.2.310.0110.00716.62
7.2.300.0060.01216.39
7.2.290.0060.01016.26
7.2.250.0120.00315.11
7.2.240.0100.01014.66
7.2.230.0070.01014.77
7.2.220.0140.00315.13
7.2.210.0040.01114.84
7.2.200.0070.00715.01
7.2.190.0040.01115.02
7.2.180.0000.01614.78
7.2.170.0080.00415.11
7.2.60.0000.01416.80
7.2.00.0070.00719.08
7.1.330.0090.00315.56
7.1.320.0070.00315.61
7.1.310.0070.00715.53
7.1.300.0000.01215.51
7.1.290.0000.00915.38
7.1.280.0060.00915.64
7.1.270.0030.00915.61
7.1.260.0040.00815.43
7.1.200.0060.00015.68
7.1.70.0000.00716.84
7.1.60.0000.01417.23
7.1.50.0180.01834.74
7.1.00.0070.04022.57
7.0.200.0000.01016.70
7.0.140.0070.06722.09
7.0.60.0200.06719.93
7.0.50.0070.05717.72
7.0.40.0100.06320.02
7.0.30.0230.08720.25
7.0.20.0130.04320.26
7.0.10.0230.04020.10
7.0.00.0030.06320.23
5.6.280.0070.06720.85
5.6.210.0070.04320.55
5.6.200.0070.08318.20
5.6.190.0170.07320.51
5.6.180.0200.04320.64
5.6.170.0330.04320.51
5.6.160.0030.04320.48
5.6.150.0130.04718.19
5.6.140.0070.08018.11
5.6.130.0100.04318.18
5.6.120.0070.04021.10
5.6.110.0100.07321.11
5.6.100.0070.08320.99
5.6.90.0070.08320.96
5.6.80.0070.08320.41
5.6.70.0230.07020.37
5.5.350.0030.05320.41
5.5.340.0030.04017.99
5.5.330.0030.04020.29
5.5.320.0200.03720.36
5.5.310.0270.03320.26
5.5.300.0100.04018.08
5.5.290.0100.07717.98
5.5.280.0070.04720.80
5.5.270.0000.04320.87
5.5.260.0130.07720.85
5.5.250.0070.08320.50
5.5.240.0070.07320.24
5.4.450.0230.07719.27
5.4.440.0230.06319.41
5.4.430.0270.04719.41
5.4.420.0270.07019.32
5.4.410.0270.06719.07
5.4.400.0200.05319.22
5.4.390.0200.07718.86
5.4.380.0200.03719.24
5.4.370.0230.06719.16
5.4.360.0300.06719.22
5.4.350.0230.07319.09
5.4.340.0270.06019.08
5.4.320.0300.04319.22
5.4.310.0200.06718.98
5.4.300.0330.06319.22
5.4.290.0200.06319.00
5.4.280.0270.05318.96
5.4.270.0300.06719.21
5.4.260.0300.06319.26
5.4.250.0300.06719.21
5.4.240.0170.05319.24
5.4.230.0230.07319.08
5.4.220.0230.05319.22
5.4.210.0230.04718.97
5.4.200.0270.05719.08
5.4.190.0130.04319.21
5.4.180.0300.05019.19
5.4.170.0270.07319.07
5.4.160.0230.03319.20
5.4.150.0270.07319.22
5.4.140.0200.06716.47
5.4.130.0230.05716.35
5.4.120.0270.06016.33
5.4.110.0300.05716.54
5.4.100.0170.04016.57
5.4.90.0130.04316.45
5.4.80.0170.06016.45
5.4.70.0200.03716.22
5.4.60.0170.03716.40
5.4.50.0230.05716.55
5.4.40.0200.07016.54
5.4.30.0330.05316.37
5.4.20.0300.06716.24
5.4.10.0300.05716.22
5.4.00.0230.06715.83
5.3.290.0200.04314.73
5.3.280.0200.07714.68
5.3.270.0230.03714.51
5.3.260.0300.07314.65
5.3.250.0300.06714.58
5.3.240.0270.06714.68
5.3.230.0300.06314.57
5.3.220.0300.07014.79
5.3.210.0230.07014.54
5.3.200.0270.06014.57
5.3.190.0230.07314.59
5.3.180.0330.06014.58
5.3.170.0200.04014.65
5.3.160.0270.02714.74
5.3.150.0230.04014.48
5.3.140.0330.05014.54
5.3.130.0230.07014.45
5.3.120.0270.07014.77
5.3.110.0270.06714.71
5.3.100.0270.06714.12
5.3.90.0270.05314.11
5.3.80.0230.04314.04
5.3.70.0230.07313.94
5.3.60.0230.07313.91
5.3.50.0270.06713.86
5.3.40.0200.04714.09
5.3.30.0170.06714.03
5.3.20.0170.04013.70
5.3.10.0330.04013.68
5.3.00.0230.04313.75
5.2.170.0170.03312.53
5.2.160.0130.04012.53
5.2.150.0230.04312.53
5.2.140.0270.05012.53
5.2.130.0200.06012.53
5.2.120.0170.05712.53
5.2.110.0170.05012.53
5.2.100.0230.03712.53
5.2.90.0170.05312.53
5.2.80.0330.04012.53
5.2.70.0270.05312.53
5.2.60.0230.05012.53
5.2.50.0230.04312.53
5.2.40.0200.05312.53
5.2.30.0170.04712.53
5.2.20.0170.06012.53
5.2.10.0130.04312.53
5.2.00.0200.05712.53
5.1.60.0200.04312.53
5.1.50.0170.04012.53
5.1.40.0170.05012.53
5.1.30.0130.05712.53
5.1.20.0200.05312.53
5.1.10.0170.03312.53
5.1.00.0230.02312.53
5.0.50.0100.04712.53
5.0.40.0130.02712.53
5.0.30.0100.06012.53
5.0.20.0070.04712.53
5.0.10.0070.04012.53
5.0.00.0100.07012.53
4.4.90.0100.03312.53
4.4.80.0070.03712.53
4.4.70.0130.03712.53
4.4.60.0170.02312.53
4.4.50.0100.02712.53
4.4.40.0170.04712.53
4.4.30.0100.03712.53
4.4.20.0100.03312.53
4.4.10.0070.03312.53
4.4.00.0130.04712.53
4.3.110.0130.02012.53
4.3.100.0070.02712.53
4.3.90.0100.03312.53
4.3.80.0100.03312.53
4.3.70.0030.03012.53
4.3.60.0100.03712.53
4.3.50.0070.02312.53
4.3.40.0100.02712.53
4.3.30.0030.02712.53
4.3.20.0070.03712.53
4.3.10.0070.03712.53
4.3.00.0070.02712.53

preferences:
45.97 ms | 401 KiB | 5 Q