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 = $test->__set($test, 'Lbhe Onfr orybatf gb zr abj'); $test->secret = 'Lbhe Onfr orybatf gb zr abj'; // 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.0110.01118.68
8.3.50.0130.00721.08
8.3.40.0090.00918.73
8.3.30.0000.01420.34
8.3.20.0040.00420.29
8.3.10.0090.00022.09
8.3.00.0000.00822.52
8.2.180.0040.01118.54
8.2.170.0140.00322.96
8.2.160.0030.01020.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0130.00626.16
8.2.120.0000.00819.77
8.2.110.0080.00822.25
8.2.100.0080.00419.21
8.2.90.0040.00419.23
8.2.80.0080.00019.34
8.2.70.0090.00017.50
8.2.60.0030.00617.93
8.2.50.0030.00518.07
8.2.40.0030.00618.03
8.2.30.0000.00718.07
8.2.20.0050.00217.72
8.2.10.0050.00317.80
8.2.00.0050.00317.67
8.1.280.0110.00425.92
8.1.270.0070.00024.66
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0050.00523.96
8.1.230.0070.00419.22
8.1.220.0000.00917.74
8.1.210.0030.00618.77
8.1.200.0060.00317.23
8.1.190.0000.00817.43
8.1.180.0040.00420.27
8.1.170.0080.00018.43
8.1.160.0040.00422.08
8.1.150.0000.00718.46
8.1.140.0040.00417.41
8.1.130.0050.00517.85
8.1.120.0050.00317.33
8.1.110.0070.00017.50
8.1.100.0040.00417.48
8.1.90.0040.00417.41
8.1.80.0000.00717.47
8.1.70.0030.00317.36
8.1.60.0060.00317.52
8.1.50.0030.00517.54
8.1.40.0050.00317.49
8.1.30.0000.00717.63
8.1.20.0030.00617.54
8.1.10.0000.00717.63
8.1.00.0040.00417.47
8.0.300.0040.00418.77
8.0.290.0050.00317.15
8.0.280.0040.00418.46
8.0.270.0030.00317.21
8.0.260.0030.00318.31
8.0.250.0000.00616.98
8.0.240.0040.00416.86
8.0.230.0030.00316.97
8.0.220.0040.00416.94
8.0.210.0000.00716.87
8.0.200.0030.00316.90
8.0.190.0000.00716.87
8.0.180.0090.00216.97
8.0.170.0040.00416.96
8.0.160.0060.00317.00
8.0.150.0000.00716.68
8.0.140.0080.00016.71
8.0.130.0000.00513.30
8.0.120.0000.00816.79
8.0.110.0070.00016.88
8.0.100.0000.00716.91
8.0.90.0000.00716.88
8.0.80.0040.01116.84
8.0.70.0040.00416.71
8.0.60.0000.00716.73
8.0.50.0000.00716.80
8.0.30.0130.00617.01
8.0.20.0080.01017.40
8.0.10.0000.00716.89
8.0.00.0060.01316.75
7.4.330.0060.00015.00
7.4.320.0030.00316.55
7.4.300.0000.00716.41
7.4.290.0000.00716.59
7.4.280.0050.00316.60
7.4.270.0030.00316.51
7.4.260.0040.00416.50
7.4.250.0040.00416.46
7.4.240.0030.00316.57
7.4.230.0030.00516.36
7.4.220.0120.00416.68
7.4.210.0100.00516.59
7.4.200.0000.00716.36
7.4.190.0070.00016.68
7.4.160.0090.00916.44
7.4.150.0120.00617.40
7.4.140.0130.00717.86
7.4.130.0090.00816.63
7.4.120.0080.00916.51
7.4.110.0130.00316.52
7.4.100.0060.01316.63
7.4.90.0140.00416.58
7.4.80.0060.01219.39
7.4.70.0150.00416.63
7.4.60.0080.00816.41
7.4.50.0030.00616.52
7.4.40.0090.00622.77
7.4.30.0040.01416.43
7.4.10.0040.01214.97
7.4.00.0050.01115.08
7.3.330.0020.00213.41
7.3.320.0060.00013.37
7.3.310.0000.00716.33
7.3.300.0030.00316.32
7.3.290.0070.00716.40
7.3.280.0090.01016.35
7.3.270.0150.00417.40
7.3.260.0120.00616.61
7.3.250.0100.01216.38
7.3.240.0120.00416.45
7.3.230.0030.01416.52
7.3.210.0070.01016.38
7.3.200.0140.00319.39
7.3.190.0110.00716.45
7.3.180.0120.00316.33
7.3.170.0000.01616.43
7.3.160.0000.01616.36
7.3.130.0110.00714.65
7.3.120.0120.00414.71
7.3.110.0100.00814.85
7.3.100.0020.01114.95
7.3.90.0110.00414.74
7.3.80.0020.01414.67
7.3.70.0050.00714.76
7.3.60.0020.01014.78
7.3.50.0030.01014.71
7.3.40.0050.00914.58
7.3.30.0020.01114.89
7.3.20.0090.00616.66
7.3.10.0060.00616.71
7.3.00.0090.00616.40
7.2.330.0110.00716.80
7.2.320.0040.01216.74
7.2.310.0100.01316.75
7.2.300.0080.00816.57
7.2.290.0040.01316.66
7.2.260.0080.00915.01
7.2.250.0050.01114.89
7.2.240.0020.01515.16
7.2.230.0070.00615.13
7.2.220.0050.01014.78
7.2.210.0080.00614.87
7.2.200.0050.00715.13
7.2.190.0080.00614.91
7.2.180.0010.01114.97
7.2.170.0060.00415.06
7.2.160.0060.00914.97
7.2.150.0030.00916.91
7.2.140.0120.00316.87
7.2.130.0050.00816.60
7.2.120.0050.00717.00
7.2.110.0050.00616.76
7.2.100.0080.00516.96
7.2.90.0050.00616.87
7.2.80.0040.00817.03
7.2.70.0050.00716.88
7.2.60.0060.00716.82
7.2.50.0070.00516.98
7.2.40.0060.00516.85
7.2.30.0030.01217.02
7.2.20.0030.01016.88
7.2.10.0040.00816.81
7.2.00.0040.00717.66
7.1.330.0050.00815.64
7.1.320.0050.00815.86
7.1.310.0050.00715.75
7.1.300.0030.00815.78
7.1.290.0050.00915.78
7.1.280.0080.00415.76
7.1.270.0030.01015.75
7.1.260.0080.00615.75
7.1.250.0030.00815.89
7.1.240.0040.00615.73
7.1.230.0060.00415.81
7.1.220.0030.00715.78
7.1.210.0100.00315.72
7.1.200.0050.00715.82
7.1.190.0050.00815.71
7.1.180.0110.00315.71
7.1.170.0080.00615.74
7.1.160.0090.00315.69
7.1.150.0020.01115.70
7.1.140.0020.01115.78
7.1.130.0070.00515.63
7.1.120.0040.00815.76
7.1.110.0050.00915.72
7.1.100.0040.00915.86
7.1.90.0020.00915.71
7.1.80.0050.00415.92
7.1.70.0060.00616.13
7.1.60.0040.00616.34
7.1.50.0150.00321.98
7.1.40.0030.00915.62
7.1.30.0030.00915.51
7.1.20.0050.01015.87
7.1.10.0060.00515.71
7.1.00.0050.01818.00
7.0.330.0080.00815.24
7.0.320.0060.00615.14
7.0.310.0020.00915.41
7.0.300.0050.01015.12
7.0.290.0000.01115.29
7.0.280.0020.00715.21
7.0.270.0020.01015.28
7.0.260.0030.00715.35
7.0.250.0070.00515.43
7.0.240.0050.00715.28
7.0.230.0060.00515.14
7.0.220.0030.01015.47
7.0.210.0060.00615.10
7.0.200.0050.01015.69
7.0.190.0070.00815.24
7.0.180.0060.00515.21
7.0.170.0030.00615.19
7.0.160.0060.00715.26
7.0.150.0090.00315.39
7.0.140.0070.02517.47
7.0.130.0040.01015.43
7.0.120.0050.00615.42
7.0.110.0010.01015.34
7.0.100.0080.00615.22
7.0.90.0020.00815.06
7.0.80.0050.00715.26
7.0.70.0060.00915.38
7.0.60.0060.03316.95
7.0.50.0060.02416.25
7.0.40.0050.02315.67
7.0.30.0130.02015.73
7.0.20.0140.02315.55
7.0.10.0120.03315.62
7.0.00.0030.01815.59
5.6.400.0060.00614.26
5.6.390.0090.00614.12
5.6.380.0050.00814.65
5.6.370.0040.00414.13
5.6.360.0060.00714.27
5.6.350.0090.00414.41
5.6.340.0050.00814.40
5.6.330.0030.00814.32
5.6.320.0090.00514.47
5.6.310.0060.00514.28
5.6.300.0040.00914.31
5.6.290.0040.01014.38
5.6.280.0040.03216.69
5.6.270.0030.01214.36
5.6.260.0090.00514.37
5.6.250.0090.00514.75
5.6.240.0090.00514.49
5.6.230.0060.00614.29
5.6.220.0040.00714.30
5.6.210.0100.02816.44
5.6.200.0070.02515.49
5.6.190.0080.02916.49
5.6.180.0080.03416.39
5.6.170.0070.02016.44
5.6.160.0050.02516.44
5.6.150.0050.02315.54
5.6.140.0070.03015.45
5.6.130.0010.03115.53
5.6.120.0080.03116.50
5.6.110.0090.03016.47
5.6.100.0070.02716.50
5.6.90.0020.02116.62
5.6.80.0050.02316.21
5.6.70.0110.02916.44
5.6.60.0050.00714.31
5.6.50.0070.00514.22
5.6.40.0020.00614.21
5.6.30.0050.00814.26
5.6.20.0050.01014.25
5.6.10.0050.00714.24
5.6.00.0020.01314.36
5.5.380.0050.00512.75
5.5.370.0040.00712.59
5.5.360.0060.00512.87
5.5.350.0030.03915.12
5.5.340.0040.03314.50
5.5.330.0090.03015.31
5.5.320.0140.03115.33
5.5.310.0100.01515.10
5.5.300.0070.03214.53
5.5.290.0030.02114.54
5.5.280.0090.02915.46
5.5.270.0070.03315.44
5.5.260.0070.03315.45
5.5.250.0080.02515.18
5.5.240.0070.03115.33
5.5.230.0040.00312.61
5.5.220.0000.01212.83
5.5.210.0050.00712.77
5.5.200.0050.00712.82
5.5.190.0030.01012.65
5.5.180.0050.00512.47
5.5.170.0050.00712.70
5.5.160.0040.00612.59
5.5.150.0070.00512.64
5.5.140.0020.01212.75
5.5.130.0050.00812.82
5.5.120.0050.00612.69
5.5.110.0080.00212.58
5.5.100.0060.00812.59
5.5.90.0040.00812.49
5.5.80.0040.00912.74
5.5.70.0050.00612.65
5.5.60.0070.00612.43
5.5.50.0040.00612.56
5.5.40.0000.01012.73
5.5.30.0050.00812.60
5.5.20.0030.01012.58
5.5.10.0020.00812.66
5.5.00.0070.00312.55
5.4.450.0130.02813.84
5.4.440.0090.03013.66
5.4.430.0150.02413.70
5.4.420.0120.02713.79
5.4.410.0090.02513.81
5.4.400.0110.02113.70
5.4.390.0120.02613.62
5.4.380.0130.02713.63
5.4.370.0150.01813.73
5.4.360.0100.03113.70
5.4.350.0110.02213.57
5.4.340.0100.02113.71
5.4.330.0030.00611.12
5.4.320.0140.02713.83
5.4.310.0100.02413.76
5.4.300.0110.01813.68
5.4.290.0130.02913.59
5.4.280.0160.02613.54
5.4.270.0140.01713.65
5.4.260.0160.01613.59
5.4.250.0110.02113.61
5.4.240.0120.02213.59
5.4.230.0150.02713.83
5.4.220.0130.02213.52
5.4.210.0150.02213.66
5.4.200.0120.02713.75
5.4.190.0160.01813.62
5.4.180.0130.02713.69
5.4.170.0130.01513.54
5.4.160.0140.01413.67
5.4.150.0120.02013.61
5.4.140.0120.02112.75
5.4.130.0130.02612.86
5.4.120.0110.02812.73
5.4.110.0120.01812.77
5.4.100.0130.02012.91
5.4.90.0100.01712.83
5.4.80.0140.02412.74
5.4.70.0140.02012.75
5.4.60.0170.02512.89
5.4.50.0100.02112.91
5.4.40.0190.02412.81
5.4.30.0110.02512.90
5.4.20.0080.03012.88
5.4.10.0120.02312.80
5.4.00.0130.01212.70
5.3.290.0130.02012.05
5.3.280.0150.02411.87
5.3.270.0110.01911.89
5.3.260.0170.02211.93
5.3.250.0090.02411.91
5.3.240.0090.03011.82
5.3.230.0150.02611.80
5.3.220.0140.02711.67
5.3.210.0140.02011.81
5.3.200.0120.02311.77
5.3.190.0140.02311.95
5.3.180.0100.02811.85
5.3.170.0140.02311.90
5.3.160.0100.02812.00
5.3.150.0130.02711.99
5.3.140.0120.02811.96
5.3.130.0120.02811.85
5.3.120.0160.02511.73
5.3.110.0140.01711.98
5.3.100.0100.01411.73
5.3.90.0100.01411.66
5.3.80.0100.01411.66
5.3.70.0100.01511.79
5.3.60.0090.01611.72
5.3.50.0090.01311.58
5.3.40.0110.01511.53
5.3.30.0100.01511.64
5.3.20.0060.01811.55
5.3.10.0100.02011.37
5.3.00.0080.01711.38
5.2.170.0100.01710.68
5.2.160.0100.01510.78
5.2.150.0070.01910.79
5.2.140.0120.01510.77
5.2.130.0150.01710.78
5.2.120.0080.03610.72
5.2.110.0110.01710.76
5.2.100.0100.01710.77
5.2.90.0080.01810.79
5.2.80.0130.01510.75
5.2.70.0090.01810.64
5.2.60.0080.01710.75
5.2.50.0050.02110.74
5.2.40.0070.01910.75
5.2.30.0100.01710.68
5.2.20.0120.01310.64
5.2.10.0080.01810.64
5.2.00.0100.01710.64
5.1.60.0050.01710.64
5.1.50.0070.01510.64
5.1.40.0100.01310.64
5.1.30.0070.01610.64
5.1.20.0080.01510.64
5.1.10.0030.02010.64
5.1.00.0080.01310.64
5.0.50.0050.01410.64
5.0.40.0050.00810.64
5.0.30.0060.01610.64
5.0.20.0030.01310.64
5.0.10.0020.01410.64
5.0.00.0050.01710.64
4.4.90.0050.01010.64
4.4.80.0030.01210.64
4.4.70.0020.01110.64
4.4.60.0000.01210.64
4.4.50.0020.01010.64
4.4.40.0080.01210.64
4.4.30.0050.00710.64
4.4.20.0000.01210.64
4.4.10.0030.01010.64
4.4.00.0070.01310.64
4.3.110.0030.01010.64
4.3.100.0030.01010.64
4.3.90.0050.00810.64
4.3.80.0050.01310.64
4.3.70.0050.00810.64
4.3.60.0080.00510.64
4.3.50.0080.00810.64
4.3.40.0070.01810.64
4.3.30.0020.01010.64
4.3.20.0020.01010.64
4.3.10.0030.00810.64
4.3.00.0030.01710.64

preferences:
45.19 ms | 401 KiB | 5 Q