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 = 'b'; // 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.70.0130.00316.63
8.3.60.0150.00018.55
8.3.50.0080.01022.11
8.3.40.0070.00718.92
8.3.30.0100.00320.34
8.3.20.0040.00420.29
8.3.10.0040.00422.08
8.3.00.0090.00022.44
8.2.180.0130.00716.75
8.2.170.0110.00422.96
8.2.160.0030.01220.36
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0200.00026.16
8.2.120.0030.00717.80
8.2.110.0030.00619.27
8.2.100.0080.00417.78
8.2.90.0050.00318.03
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0000.00817.93
8.2.50.0000.00918.07
8.2.40.0140.00017.88
8.2.30.0030.00518.12
8.2.20.0030.00517.67
8.2.10.0000.00817.63
8.2.00.0080.00017.83
8.1.280.0120.00325.92
8.1.270.0030.00524.66
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0070.00322.08
8.1.230.0070.00720.89
8.1.220.0080.00017.79
8.1.210.0000.00818.85
8.1.200.0040.00817.23
8.1.190.0000.00817.52
8.1.180.0040.00419.01
8.1.170.0050.00318.48
8.1.160.0020.00522.15
8.1.150.0030.00518.49
8.1.140.0040.00417.36
8.1.130.0050.00317.84
8.1.120.0050.00217.32
8.1.110.0000.00817.33
8.1.100.0000.00917.28
8.1.90.0000.00717.41
8.1.80.0070.00017.37
8.1.70.0000.00717.41
8.1.60.0060.00317.57
8.1.50.0000.00817.48
8.1.40.0040.00417.55
8.1.30.0040.00417.64
8.1.20.0040.00417.68
8.1.10.0000.00717.51
8.1.00.0040.00417.52
8.0.300.0070.00019.87
8.0.290.0000.00717.05
8.0.280.0070.00018.40
8.0.270.0000.00717.09
8.0.260.0030.00316.85
8.0.250.0040.00416.92
8.0.240.0000.00816.93
8.0.230.0030.00316.98
8.0.220.0030.00316.95
8.0.210.0080.00016.90
8.0.200.0000.00617.04
8.0.190.0060.00316.98
8.0.180.0040.00416.96
8.0.170.0000.00716.84
8.0.160.0050.00216.96
8.0.150.0030.00316.75
8.0.140.0000.00716.78
8.0.130.0000.00613.35
8.0.120.0040.00416.88
8.0.110.0040.00416.80
8.0.100.0000.00716.91
8.0.90.0000.00816.78
8.0.80.0070.01016.93
8.0.70.0040.00416.77
8.0.60.0000.00716.95
8.0.50.0050.00216.77
8.0.30.0120.01017.07
8.0.20.0120.00617.40
8.0.10.0000.00816.87
8.0.00.0150.00616.92
7.4.330.0000.00615.00
7.4.320.0000.00616.53
7.4.300.0070.00016.66
7.4.290.0100.00016.54
7.4.280.0030.00316.65
7.4.270.0030.00316.66
7.4.260.0000.00716.46
7.4.250.0050.00216.59
7.4.240.0020.00516.38
7.4.230.0000.00716.69
7.4.220.0030.01516.66
7.4.210.0050.01016.53
7.4.200.0070.00016.71
7.4.190.0040.00416.68
7.4.160.0060.00916.48
7.4.150.0070.01317.40
7.4.140.0120.00617.86
7.4.130.0100.00716.63
7.4.120.0100.00816.55
7.4.110.0110.01116.38
7.4.100.0030.02016.50
7.4.90.0090.00916.58
7.4.80.0100.01019.39
7.4.70.0030.01416.52
7.4.60.0070.01016.38
7.4.50.0040.00416.30
7.4.40.0070.01022.77
7.4.30.0030.01316.60
7.4.10.0030.01316.38
7.4.00.0070.01015.71
7.3.330.0050.00013.22
7.3.320.0050.00013.22
7.3.310.0030.00316.27
7.3.300.0030.00316.38
7.3.290.0000.01416.37
7.3.280.0070.00816.31
7.3.270.0130.00317.40
7.3.260.0200.00016.37
7.3.250.0130.00816.28
7.3.240.0060.01216.66
7.3.230.0180.00316.39
7.3.210.0030.01716.59
7.3.200.0150.00619.39
7.3.190.0150.00416.19
7.3.180.0060.00916.58
7.3.170.0100.00716.31
7.3.160.0100.00716.42
7.3.130.0030.01316.39
7.3.120.0080.00815.57
7.3.110.0140.00016.45
7.3.100.0070.00716.22
7.3.90.0100.00716.35
7.3.80.0060.00616.33
7.3.70.0030.01016.45
7.3.60.0030.00616.36
7.3.50.0100.00316.48
7.3.40.0030.01016.24
7.3.30.0070.00716.21
7.3.20.0040.00718.36
7.3.10.0050.00717.36
7.3.00.0070.00717.32
7.2.330.0130.00616.66
7.2.320.0130.01216.67
7.2.310.0070.01616.68
7.2.300.0100.00616.80
7.2.290.0180.00316.71
7.2.260.0050.01216.64
7.2.250.0060.01216.45
7.2.240.0090.00616.36
7.2.230.0030.01216.73
7.2.220.0090.00616.39
7.2.210.0030.00716.56
7.2.200.0000.01316.50
7.2.190.0070.00716.46
7.2.180.0040.01116.48
7.2.170.0030.01016.45
7.2.160.0060.00316.54
7.2.150.0000.01218.25
7.2.140.0030.01018.34
7.2.130.0070.00717.65
7.2.120.0100.00617.77
7.2.110.0050.01317.65
7.2.100.0070.00617.69
7.2.90.0100.00517.64
7.2.80.0090.00917.48
7.2.70.0100.00217.64
7.2.60.0070.00717.37
7.2.50.0050.00917.55
7.2.40.0090.00517.50
7.2.30.0040.01117.63
7.2.20.0040.01117.47
7.2.10.0050.00817.56
7.2.00.0080.00518.15
7.1.330.0060.00617.42
7.1.320.0070.00717.39
7.1.310.0060.00917.47
7.1.300.0030.01017.39
7.1.290.0070.00717.49
7.1.280.0060.00917.41
7.1.270.0110.00417.43
7.1.260.0040.00417.18
7.1.250.0050.00916.46
7.1.240.0040.00817.21
7.1.230.0030.01517.11
7.1.220.0060.00617.34
7.1.210.0030.01017.18
7.1.200.0050.00816.53
7.1.190.0040.00817.24
7.1.180.0000.01417.27
7.1.170.0030.01017.25
7.1.160.0110.00317.27
7.1.150.0100.00317.29
7.1.140.0030.01017.30
7.1.130.0040.00717.31
7.1.120.0060.00617.40
7.1.110.0070.01117.20
7.1.100.0050.00817.85
7.1.90.0060.00317.29
7.1.80.0030.01017.25
7.1.70.0060.00617.11
7.1.60.0060.01218.37
7.1.50.0100.01017.10
7.1.40.0090.00617.22
7.1.30.0000.01517.40
7.1.20.0000.01417.35
7.1.10.0090.00617.20
7.1.00.0000.03219.73
7.0.330.0060.01116.98
7.0.320.0040.01116.88
7.0.310.0130.00317.05
7.0.300.0040.00716.92
7.0.290.0120.00616.78
7.0.280.0110.00416.84
7.0.270.0040.01117.05
7.0.260.0030.00716.89
7.0.250.0030.01016.94
7.0.240.0070.00316.82
7.0.230.0030.00917.04
7.0.220.0070.00716.92
7.0.210.0090.00316.95
7.0.200.0060.00416.74
7.0.190.0040.00816.98
7.0.180.0030.01016.90
7.0.170.0070.00417.08
7.0.160.0030.01316.80
7.0.150.0000.01316.92
7.0.140.0050.03819.43
7.0.130.0090.00316.96
7.0.120.0070.00716.94
7.0.110.0100.03718.55
7.0.100.0070.04118.40
7.0.90.0060.03518.41
7.0.80.0080.03318.40
7.0.70.0100.04118.44
7.0.60.0100.04318.31
7.0.50.0040.04018.51
7.0.40.0030.03317.45
7.0.30.0090.04217.37
7.0.20.0020.02717.31
7.0.10.0070.02017.23
7.0.00.0030.02417.35
5.6.400.0070.01116.30
5.6.390.0070.01015.80
5.6.380.0090.00615.95
5.6.370.0120.00615.57
5.6.360.0030.01615.85
5.6.350.0110.00415.89
5.6.340.0080.00415.93
5.6.330.0100.00616.21
5.6.320.0080.00315.96
5.6.310.0080.00816.05
5.6.300.0110.00015.77
5.6.290.0070.00715.81
5.6.280.0050.04218.42
5.6.270.0030.01016.02
5.6.260.0140.03718.51
5.6.250.0090.02318.38
5.6.240.0030.03618.32
5.6.230.0080.02718.23
5.6.220.0080.04118.15
5.6.210.0100.04118.31
5.6.200.0070.04118.40
5.6.190.0110.03718.19
5.6.180.0040.02418.40
5.6.170.0080.03218.34
5.6.160.0110.01918.23
5.6.150.0050.02618.16
5.6.140.0100.04018.19
5.6.130.0120.03818.21
5.6.120.0040.02418.30
5.6.110.0120.04018.34
5.6.100.0080.03518.29
5.6.90.0060.04318.09
5.6.80.0120.03617.83
5.6.70.0140.03717.94
5.6.60.0020.03017.95
5.6.50.0070.04217.96
5.6.40.0050.04217.88
5.6.30.0070.03717.71
5.6.20.0050.04117.99
5.6.10.0080.03817.99
5.6.00.0050.04917.95
5.5.380.0060.04316.79
5.5.370.0050.04316.88
5.5.360.0100.04016.85
5.5.350.0060.02816.69
5.5.340.0060.04216.98
5.5.330.0060.04116.92
5.5.320.0100.04317.07
5.5.310.0100.02716.92
5.5.300.0080.04317.00
5.5.290.0050.03416.88
5.5.280.0080.04017.03
5.5.270.0050.04716.98
5.5.260.0050.03716.90
5.5.250.0070.02216.91
5.5.240.0050.04416.67
5.5.230.0080.03616.55
5.5.220.0060.03816.49
5.5.210.0050.04316.55
5.5.200.0070.04016.56
5.5.190.0060.04016.63
5.5.180.0030.04316.44
5.5.170.0000.01415.60
5.5.160.0030.03316.51
5.5.150.0130.03716.59
5.5.140.0030.04616.56
5.5.130.0100.03516.60
5.5.120.0070.04016.40
5.5.110.0070.04516.38
5.5.100.0100.04216.60
5.5.90.0050.02516.43
5.5.80.0100.04016.59
5.5.70.0080.02316.58
5.5.60.0060.03316.47
5.5.50.0080.03316.64
5.5.40.0050.04116.49
5.5.30.0030.04116.27
5.5.20.0070.02416.65
5.5.10.0050.03016.61
5.5.00.0070.02216.32
5.4.450.0090.03815.97
5.4.440.0100.04116.06
5.4.430.0060.04216.00
5.4.420.0060.04015.94
5.4.410.0050.04415.91
5.4.400.0070.03815.83
5.4.390.0020.02515.78
5.4.380.0070.03615.63
5.4.370.0100.03515.84
5.4.360.0100.03715.88
5.4.350.0020.04215.77
5.4.340.0050.02815.83
5.4.330.0000.00612.57
5.4.320.0080.03515.75
5.4.310.0080.02316.04
5.4.300.0000.04615.87
5.4.290.0040.04015.82
5.4.280.0120.03315.96
5.4.270.0060.04115.80
5.4.260.0060.02815.79
5.4.250.0100.03515.92
5.4.240.0030.02515.95
5.4.230.0050.03315.75
5.4.220.0080.03815.91
5.4.210.0070.03615.72
5.4.200.0020.04515.90
5.4.190.0080.04015.75
5.4.180.0050.02715.79
5.4.170.0050.02215.94
5.4.160.0020.02515.77
5.4.150.0060.02315.72
5.4.140.0030.02014.48
5.4.130.0050.02014.50
5.4.120.0080.02014.57
5.4.110.0020.02314.46
5.4.100.0030.02214.64
5.4.90.0000.04014.37
5.4.80.0050.01714.60
5.4.70.0030.02414.43
5.4.60.0010.02814.43
5.4.50.0040.02114.43
5.4.40.0020.02514.54
5.4.30.0050.02014.53
5.4.20.0030.02214.57
5.4.10.0070.03814.42
5.4.00.0100.01514.34
5.3.290.0070.04213.93
5.3.280.0050.04013.81
5.3.270.0030.02513.89
5.3.260.0080.02013.91
5.3.250.0050.02213.88
5.3.240.0030.02113.79
5.3.230.0030.02313.79
5.3.220.0070.02513.67
5.3.210.0090.01613.73
5.3.200.0030.01813.73
5.3.190.0070.02013.79
5.3.180.0000.02513.92
5.3.170.0030.02313.86
5.3.160.0080.01513.84
5.3.150.0030.03813.88
5.3.140.0020.03313.85
5.3.130.0050.03613.85
5.3.120.0010.02513.74
5.3.110.0060.02013.68
5.3.100.0030.02113.53
5.3.90.0020.01913.59
5.3.80.0030.02213.44
5.3.70.0050.02013.47
5.3.60.0070.01513.47
5.3.50.0090.01613.57
5.3.40.0020.02413.46
5.3.30.0030.03213.43
5.3.20.0000.03013.35
5.3.10.0050.01813.30
5.3.00.0030.01813.19
5.2.170.0000.03012.09
5.2.160.0030.02312.09
5.2.150.0000.03012.09
5.2.140.0000.03712.09
5.2.130.0070.02012.09
5.2.120.0030.03012.09
5.2.110.0030.03012.09
5.2.100.0000.03312.09
5.2.90.0030.02312.09
5.2.80.0030.02312.09
5.2.70.0000.03012.09
5.2.60.0000.03012.09
5.2.50.0000.03012.09
5.2.40.0070.02712.09
5.2.30.0030.02712.09
5.2.20.0030.03012.09
5.2.10.0000.03012.09
5.2.00.0030.02312.09
5.1.60.0030.03312.09
5.1.50.0030.02312.09
5.1.40.0000.02712.09
5.1.30.0000.03012.09
5.1.20.0000.03012.09
5.1.10.0030.02712.09
5.1.00.0030.03312.09
5.0.50.0000.02012.09
5.0.40.0030.01712.09
5.0.30.0000.03712.09
5.0.20.0030.03312.09
5.0.10.0000.04312.09
5.0.00.0100.04312.09
4.4.90.0030.01312.09
4.4.80.0000.01712.09
4.4.70.0000.01712.09
4.4.60.0000.01712.09
4.4.50.0030.01312.09
4.4.40.0000.02312.09
4.4.30.0030.01312.09
4.4.20.0000.01312.09
4.4.10.0030.02712.09
4.4.00.0000.02712.09
4.3.110.0030.01312.09
4.3.100.0070.01012.09
4.3.90.0030.02012.09
4.3.80.0000.02312.09
4.3.70.0000.01312.09
4.3.60.0000.01312.09
4.3.50.0030.03312.09
4.3.40.0000.02012.09
4.3.30.0000.03312.09
4.3.20.0000.03712.09
4.3.10.0000.02712.09
4.3.00.0070.02012.09

preferences:
45.23 ms | 401 KiB | 5 Q