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 4. No redefining $test 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 abstract Class Joe implements arrayaccess{ } $test->callback = new Joe; // 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.40.0070.01118.97
8.3.30.0100.00719.05
8.3.20.0040.00420.30
8.3.10.0000.00822.09
8.3.00.0070.00022.46
8.2.170.0090.00622.96
8.2.160.0070.00720.34
8.2.150.0070.00024.18
8.2.140.0150.00424.66
8.2.130.0070.00726.16
8.2.120.0050.00319.48
8.2.110.0030.00722.13
8.2.100.0040.00817.69
8.2.90.0030.00617.50
8.2.80.0040.00418.05
8.2.70.0000.00817.93
8.2.60.0080.00017.93
8.2.50.0000.00818.10
8.2.40.0000.00920.59
8.2.30.0050.00518.14
8.2.20.0030.00617.77
8.2.10.0080.00019.53
8.2.00.0000.00717.76
8.1.270.0070.01123.63
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00922.20
8.1.230.0040.00719.06
8.1.220.0040.00417.76
8.1.210.0030.00618.77
8.1.200.0030.00617.48
8.1.190.0030.00617.22
8.1.180.0000.00818.10
8.1.170.0080.00018.53
8.1.160.0060.00322.04
8.1.150.0040.00418.65
8.1.140.0000.00817.37
8.1.130.0070.00017.74
8.1.120.0000.00717.51
8.1.110.0050.00317.51
8.1.100.0040.00417.49
8.1.90.0000.00717.41
8.1.80.0000.00717.44
8.1.70.0030.00317.42
8.1.60.0060.00317.48
8.1.50.0020.00517.52
8.1.40.0000.00817.54
8.1.30.0000.00817.62
8.1.20.0030.00517.57
8.1.10.0000.00717.58
8.1.00.0040.00417.49
8.0.300.0040.00419.73
8.0.290.0000.00816.75
8.0.280.0030.00318.45
8.0.270.0070.00017.27
8.0.260.0000.00616.86
8.0.250.0000.00817.05
8.0.240.0030.00616.92
8.0.230.0040.00417.04
8.0.220.0000.00816.97
8.0.210.0000.00716.84
8.0.200.0060.00016.89
8.0.190.0050.00317.00
8.0.180.0070.00016.85
8.0.170.0040.00417.05
8.0.160.0000.00816.95
8.0.150.0040.00416.81
8.0.140.0000.00816.92
8.0.130.0060.00013.38
8.0.120.0050.00316.91
8.0.110.0030.00516.79
8.0.100.0040.00417.01
8.0.90.0000.00716.96
8.0.80.0030.01216.89
8.0.70.0040.00416.96
8.0.60.0000.00716.88
8.0.50.0000.00716.91
8.0.30.0080.01517.04
8.0.20.0070.01117.40
8.0.10.0050.00216.96
8.0.00.0140.00616.79
7.4.330.0030.00315.13
7.4.320.0060.00016.60
7.4.300.0030.00316.60
7.4.290.0040.00416.66
7.4.280.0000.00816.50
7.4.270.0030.00316.45
7.4.260.0090.00016.39
7.4.250.0000.00716.55
7.4.240.0040.00416.44
7.4.230.0040.00416.71
7.4.220.0030.02016.64
7.4.210.0090.00516.61
7.4.200.0000.00816.36
7.4.190.0020.00516.47
7.4.160.0060.00916.50
7.4.150.0120.00617.40
7.4.140.0060.01317.86
7.4.130.0110.01316.47
7.4.120.0110.00716.54
7.4.110.0100.00716.46
7.4.100.0040.01616.63
7.4.90.0090.00916.38
7.4.80.0070.01419.39
7.4.70.0080.00816.50
7.4.60.0080.01016.59
7.4.50.0030.00316.22
7.4.40.0130.00322.77
7.4.30.0040.01216.38
7.4.00.0070.00715.11
7.3.330.0050.00013.32
7.3.320.0000.00613.33
7.3.310.0000.00716.12
7.3.300.0030.00316.37
7.3.290.0070.01116.31
7.3.280.0050.01216.33
7.3.270.0110.00617.40
7.3.260.0070.01016.57
7.3.250.0020.01516.30
7.3.240.0070.01016.27
7.3.230.0060.00916.39
7.3.210.0090.00916.61
7.3.200.0090.01319.39
7.3.190.0030.01416.61
7.3.180.0090.00616.29
7.3.170.0070.01016.39
7.3.160.0170.00316.56
7.3.120.0070.01214.54
7.3.110.0080.01014.91
7.3.100.0070.00714.94
7.3.90.0080.00514.65
7.3.80.0070.00714.90
7.3.70.0030.01214.84
7.3.60.0040.00414.88
7.3.50.0110.00414.57
7.3.40.0030.00614.83
7.3.30.0060.00614.78
7.3.20.0130.00016.53
7.3.10.0150.00716.40
7.3.00.0090.00916.33
7.2.330.0120.00916.66
7.2.320.0100.00916.69
7.2.310.0070.01016.64
7.2.300.0060.01316.68
7.2.290.0080.01116.45
7.2.250.0070.01115.19
7.2.240.0140.00014.89
7.2.230.0070.00714.86
7.2.220.0060.00615.20
7.2.210.0100.00314.86
7.2.200.0090.00615.11
7.2.190.0060.00914.86
7.2.180.0040.01115.00
7.2.170.0060.00614.98
7.2.130.0180.00516.66
7.2.120.0100.00816.56
7.2.110.0130.01316.53
7.2.100.0180.01216.33
7.2.90.0080.00916.38
7.2.80.0150.00916.39
7.2.70.0220.01316.65
7.2.60.0080.00616.59
7.2.50.0080.01016.60
7.2.40.0290.01016.60
7.2.30.0080.01116.37
7.2.20.0100.01316.48
7.2.10.0150.00916.48
7.2.00.0050.00917.55
7.1.330.0040.01115.75
7.1.320.0090.00615.70
7.1.310.0070.01015.80
7.1.300.0070.00715.70
7.1.290.0070.00715.58
7.1.280.0040.00715.79
7.1.270.0060.00315.82
7.1.260.0000.01015.34
7.1.250.0170.00415.21
7.1.200.0060.00615.78
7.1.100.0040.00718.05
7.1.70.0030.00717.09
7.1.60.0140.01019.82
7.1.50.0070.01616.84
7.1.00.0030.07722.43
7.0.200.0110.00614.92
7.0.140.0070.06722.12
7.0.60.0100.05719.93
7.0.50.0030.04017.73
7.0.40.0070.07020.07
7.0.30.0400.06320.10
7.0.20.0400.07720.15
7.0.10.0300.07020.24
7.0.00.0070.09020.06
5.6.280.0070.07021.00
5.6.210.0000.07020.72
5.6.200.0070.05318.24
5.6.190.0070.07320.61
5.6.180.3530.03720.48
5.6.170.0230.03320.54
5.6.160.0030.04320.61
5.6.150.0100.07018.27
5.6.140.0070.06318.24
5.6.130.0000.08718.14
5.6.120.0230.06721.00
5.6.110.0100.07721.05
5.6.100.0030.08321.13
5.6.90.0100.04021.11
5.6.80.0200.06720.34
5.6.70.0370.06720.42
5.5.350.0030.08020.50
5.5.340.0100.04317.93
5.5.330.0070.08320.47
5.5.320.0330.07020.25
5.5.310.0370.07020.27
5.5.300.0030.08017.94
5.5.290.0100.06318.08
5.5.280.0070.05320.88
5.5.270.0070.03720.80
5.5.260.0000.08320.88
5.5.250.0070.06720.69
5.5.240.0070.06320.29
5.4.450.2270.04319.52
5.4.440.0600.04019.47
5.4.430.0170.03319.41
5.4.420.0070.04019.41
5.4.410.1800.03319.37
5.4.400.2100.04318.87
5.4.390.0600.04019.09
5.4.380.0030.03718.86
5.4.370.0000.04718.83
5.4.360.0500.04019.00
5.4.350.2130.04019.24
5.4.340.1800.03319.31
5.4.320.1670.03719.22
5.4.310.1930.03718.87
5.4.300.1930.03719.14
5.4.290.1670.04019.15
5.4.280.1900.04019.08
5.4.270.1730.03019.21
5.4.260.1770.03719.24
5.4.250.1630.03719.30
5.4.240.1700.03319.23
5.4.230.0200.02718.86
5.4.220.0070.03718.99
5.4.210.0030.03719.14
5.4.200.1070.03719.15
5.4.190.1830.04019.18
5.4.180.1600.03719.07
5.4.170.1800.04019.15
5.4.160.1800.03019.03
5.4.150.2100.03719.07
5.4.140.2030.04016.34
5.4.130.2000.04316.48
5.4.120.1730.04016.33
5.4.110.1970.04016.53
5.4.100.2000.03716.27
5.4.90.1970.03716.19
5.4.80.1930.04016.35
5.4.70.1930.04316.49
5.4.60.1900.04316.39
5.4.50.2000.04016.16
5.4.40.1930.03316.52
5.4.30.2070.03716.31
5.4.20.1970.04716.53
5.4.10.1970.04716.16
5.4.00.2030.04015.82
5.3.290.1730.04014.72
5.3.280.1930.04714.64
5.3.270.1970.04014.66
5.3.260.2030.04714.68
5.3.250.1700.04014.68
5.3.240.2100.03714.75
5.3.230.1800.03014.50
5.3.220.1930.03314.47
5.3.210.1730.04314.53
5.3.200.2330.04314.68
5.3.190.2700.03714.57
5.3.180.2430.03714.55
5.3.170.2570.03014.54
5.3.160.2570.04014.49
5.3.150.2400.04314.64
5.3.140.2270.05014.57
5.3.130.2400.04014.47
5.3.120.2330.05014.55
5.3.110.2000.04314.70
5.3.100.1870.03714.12
5.3.90.1930.03714.00
5.3.80.2130.04014.11
5.3.70.1800.03714.04
5.3.60.1770.03714.13
5.3.50.1830.03313.86
5.3.40.2030.04313.86
5.3.30.2170.03313.89
5.3.20.1770.03713.82
5.3.10.1800.03713.67
5.3.00.1930.03313.54
5.2.170.1430.03311.38
5.2.160.1770.03311.06
5.2.150.1600.02711.20
5.2.140.1630.03311.21
5.2.130.1570.02311.04
5.2.120.1570.03011.19
5.2.110.1530.02311.34
5.2.100.0900.03311.04
5.2.90.0000.03011.34
5.2.80.0030.02711.11
5.2.70.0070.03311.21
5.2.60.0030.02711.28
5.2.50.1800.03311.16
5.2.40.1370.02310.93
5.2.30.1330.03310.90
5.2.20.1500.02710.89
5.2.10.1500.03310.78
5.2.00.1500.03010.94
5.1.60.1230.0239.98
5.1.50.1570.03010.09
5.1.40.1330.02310.13
5.1.30.1500.02710.43
5.1.20.1270.02710.27
5.1.10.1170.03010.06
5.1.00.1470.0339.95
5.0.50.0630.0208.55
5.0.40.0700.0278.55
5.0.30.0800.0438.55
5.0.20.0670.0238.55
5.0.10.0800.0308.55
5.0.00.0670.0278.55
4.4.90.0770.0238.55
4.4.80.0670.0138.55
4.4.70.0800.0238.55
4.4.60.1030.0138.55
4.4.50.1100.0138.55
4.4.40.0870.0208.55
4.4.30.0730.0138.55
4.4.20.1070.0238.55
4.4.10.0930.0208.55
4.4.00.0530.0408.55
4.3.110.1100.0208.55
4.3.100.0970.0178.55
4.3.90.0730.0208.55
4.3.80.0830.0278.55
4.3.70.0770.0138.55
4.3.60.0700.0138.55
4.3.50.1000.0178.55
4.3.40.0900.0338.55
4.3.30.0530.0178.55
4.3.20.0470.0278.55
4.3.10.0400.0178.55
4.3.00.0500.0238.55

preferences:
45.59 ms | 404 KiB | 6 Q