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 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.60.0000.01418.43
8.3.50.0030.01321.87
8.3.40.0090.00918.79
8.3.30.0110.00718.97
8.3.20.0050.00320.29
8.3.10.0040.00421.96
8.3.00.0040.00422.57
8.2.180.0040.01116.48
8.2.170.0150.00618.89
8.2.160.0170.00322.96
8.2.150.0050.00324.18
8.2.140.0060.01224.66
8.2.130.0050.00326.16
8.2.120.0040.00419.38
8.2.110.0120.00920.44
8.2.100.0040.00717.72
8.2.90.0030.00617.75
8.2.80.0040.00417.97
8.2.70.0030.00518.04
8.2.60.0040.00418.05
8.2.50.0040.00418.10
8.2.40.0030.00620.67
8.2.30.0050.00318.07
8.2.20.0030.00617.68
8.2.10.0040.00419.64
8.2.00.0040.00417.70
8.1.280.0060.00925.92
8.1.270.0030.00622.01
8.1.260.0000.00826.35
8.1.250.0030.00628.09
8.1.240.0040.00822.04
8.1.230.0090.00323.89
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0000.00817.25
8.1.190.0000.00917.23
8.1.180.0080.00018.10
8.1.170.0000.00818.66
8.1.160.0030.00621.94
8.1.150.0030.00618.70
8.1.140.0050.00317.47
8.1.130.0030.00317.84
8.1.120.0030.00317.44
8.1.110.0000.00717.54
8.1.100.0040.00417.46
8.1.90.0000.00817.40
8.1.80.0040.00417.36
8.1.70.0030.00317.43
8.1.60.0030.00617.62
8.1.50.0050.00317.54
8.1.40.0030.00517.52
8.1.30.0040.00417.62
8.1.20.0000.00817.65
8.1.10.0040.00417.55
8.1.00.0000.00817.43
8.0.300.0070.00019.58
8.0.290.0000.00816.88
8.0.280.0040.00418.45
8.0.270.0030.00317.27
8.0.260.0030.00316.95
8.0.250.0030.00616.98
8.0.240.0000.00816.99
8.0.230.0000.00716.87
8.0.220.0000.00717.00
8.0.210.0070.00016.95
8.0.200.0060.00016.98
8.0.190.0040.00417.05
8.0.180.0040.00417.01
8.0.170.0050.00316.87
8.0.160.0000.00816.88
8.0.150.0000.00717.03
8.0.140.0000.00816.94
8.0.130.0050.00013.37
8.0.120.0000.00716.92
8.0.110.0040.00417.00
8.0.100.0040.00416.76
8.0.90.0040.00416.78
8.0.80.0070.00716.94
8.0.70.0000.00716.88
8.0.60.0000.00716.87
8.0.50.0070.00017.06
8.0.30.0110.01017.25
8.0.20.0140.00417.40
8.0.10.0070.00017.05
8.0.00.0140.00816.88
7.4.330.0030.00315.15
7.4.320.0060.00016.47
7.4.300.0030.00316.57
7.4.290.0070.00016.63
7.4.280.0000.00816.61
7.4.270.0050.00216.63
7.4.260.0030.00316.48
7.4.250.0000.00716.48
7.4.240.0020.00516.63
7.4.230.0030.00316.71
7.4.220.0100.01416.47
7.4.210.0080.00716.54
7.4.200.0070.00016.52
7.4.190.0070.00016.55
7.4.160.0030.01316.34
7.4.150.0080.00817.40
7.4.140.0120.00817.86
7.4.130.0060.01216.56
7.4.120.0070.01016.58
7.4.110.0060.01116.66
7.4.100.0140.00416.36
7.4.90.0130.00316.63
7.4.80.0000.01919.39
7.4.70.0110.00516.46
7.4.60.0100.00616.41
7.4.50.0000.00716.65
7.4.40.0060.00622.77
7.4.30.0060.01016.58
7.4.00.0060.00914.78
7.3.330.0050.00013.04
7.3.320.0000.00613.10
7.3.310.0070.00016.21
7.3.300.0030.00316.27
7.3.290.0070.01016.23
7.3.280.0100.01016.23
7.3.270.0170.00017.40
7.3.260.0150.00316.23
7.3.250.0070.01016.26
7.3.240.0040.01116.52
7.3.230.0070.01016.44
7.3.210.0060.01216.30
7.3.200.0120.00919.39
7.3.190.0160.00316.34
7.3.180.0030.01616.46
7.3.170.0130.00316.29
7.3.160.0100.01016.30
7.3.120.0030.01314.70
7.3.10.0080.00316.57
7.3.00.0030.00816.51
7.2.330.0070.01416.73
7.2.320.0120.00816.38
7.2.310.0130.00316.54
7.2.300.0140.00716.65
7.2.290.0150.00616.44
7.2.130.0090.00516.73
7.2.120.0060.00616.80
7.2.110.0070.01016.85
7.2.100.0040.00716.78
7.2.90.0050.00916.72
7.2.80.0030.00716.85
7.2.70.0030.00816.97
7.2.60.0080.00516.84
7.2.50.0090.00316.78
7.2.40.0050.00516.80
7.2.30.0050.00716.74
7.2.20.0050.00716.75
7.2.10.0080.00316.82
7.2.00.0070.00516.77
7.1.250.0040.01015.68
7.1.240.0060.00915.35
7.1.230.0070.00815.45
7.1.220.0000.01715.34
7.1.210.0100.00715.52
7.1.200.0060.00815.62
7.1.190.0090.00615.50
7.1.180.0070.01015.49
7.1.170.0070.00315.63
7.1.160.0040.00415.17
7.1.150.0080.00415.73
7.1.140.0070.00315.68
7.1.130.0060.00615.48
7.1.120.0060.00615.64
7.1.110.0030.00915.38
7.1.100.0100.00315.53
7.1.90.0060.00615.63
7.1.80.0040.00415.72
7.1.70.0090.00516.14
7.1.60.0070.00917.65
7.1.50.0100.00916.24
7.1.40.0090.00615.71
7.1.30.0050.00515.64
7.1.20.0060.00615.49
7.1.10.0000.00815.37
7.1.00.0030.04218.92
7.0.330.0110.00415.05
7.0.320.0120.00415.26
7.0.310.0000.01315.38
7.0.300.0000.01014.97
7.0.290.0090.00415.25
7.0.280.0000.00915.29
7.0.270.0060.00615.07
7.0.260.0060.00915.32
7.0.250.0040.00715.05
7.0.240.0000.00915.36
7.0.230.0060.00615.14
7.0.220.0000.01115.07
7.0.210.0080.00315.34
7.0.200.0030.01015.95
7.0.190.0030.01015.36
7.0.180.0060.00615.23
7.0.170.0070.00715.11
7.0.160.0030.01014.95
7.0.150.0070.00715.09
7.0.140.0050.03918.70
7.0.130.0040.00815.17
7.0.120.0040.00415.32
7.0.110.0030.00615.17
7.0.100.0100.00315.07
7.0.90.0110.00015.15
7.0.80.0040.01115.45
7.0.70.0070.00315.20
7.0.60.0060.04517.48
7.0.50.0050.02416.59
7.0.40.0070.02716.67
7.0.30.0220.03216.84
7.0.20.0150.04216.58
7.0.10.0190.03916.85
7.0.00.0100.04116.79
5.6.380.0040.00714.47
5.6.370.0080.00414.25
5.6.360.0120.00013.96
5.6.350.0070.01114.18
5.6.340.0070.00413.96
5.6.330.0000.01114.38
5.6.320.0060.00614.40
5.6.310.0090.00014.13
5.6.300.0040.00714.12
5.6.290.0120.00314.16
5.6.280.0080.03517.70
5.6.270.0040.00713.99
5.6.260.0060.01014.02
5.6.250.0050.00514.17
5.6.240.0070.00414.19
5.6.230.0040.00814.45
5.6.220.0000.01214.27
5.6.210.0080.04517.47
5.6.200.0070.04316.17
5.6.190.0070.04217.37
5.6.180.1640.02317.31
5.6.170.0110.02517.38
5.6.160.0070.04417.31
5.6.150.0070.04016.24
5.6.140.0090.02716.31
5.6.130.0050.04216.13
5.6.120.0080.03117.55
5.6.110.0060.04717.65
5.6.100.0070.03917.47
5.6.90.0100.04317.58
5.6.80.0070.04017.32
5.6.70.0220.03617.22
5.6.60.0100.00214.00
5.6.50.0030.00914.25
5.6.40.0000.01414.27
5.6.30.0070.00713.95
5.6.20.0060.00813.89
5.6.10.0060.00614.23
5.6.00.0090.00914.09
5.5.380.0070.00211.19
5.5.370.0040.00411.34
5.5.360.0060.00011.07
5.5.350.0060.03815.68
5.5.340.0030.03314.42
5.5.330.0040.03715.57
5.5.320.0180.03915.76
5.5.310.0150.04015.65
5.5.300.0000.02714.33
5.5.290.0050.04114.60
5.5.280.0020.02415.84
5.5.270.0000.02516.05
5.5.260.0040.02116.00
5.5.250.0060.02815.93
5.5.240.0100.04115.63
5.5.230.0040.00411.18
5.5.220.0040.00410.87
5.5.210.0030.00611.15
5.5.200.0040.00411.14
5.5.190.0000.00610.99
5.5.180.0000.00710.88
5.5.170.0000.00910.67
5.5.160.0040.00210.86
5.5.150.0050.00510.95
5.5.140.0030.00611.02
5.5.130.0080.00310.91
5.5.120.0060.00310.93
5.5.110.0000.01110.86
5.5.100.0000.01010.93
5.5.90.0030.00510.96
5.5.80.0060.00310.85
5.5.70.0000.00710.54
5.5.60.0040.00410.77
5.5.50.0000.00710.87
5.5.40.0030.00511.07
5.5.30.0040.00410.81
5.5.20.0050.00211.06
5.5.10.0100.00010.77
5.5.00.0080.00011.11
5.4.450.0250.03915.30
5.4.440.0080.02915.12
5.4.430.0100.02715.07
5.4.420.0050.03015.05
5.4.410.0070.02815.18
5.4.400.0880.00014.82
5.4.390.0780.00214.61
5.4.380.0150.03214.78
5.4.370.0080.03014.70
5.4.360.0130.02914.77
5.4.350.0160.02514.69
5.4.340.0130.03214.82
5.4.330.0070.00010.87
5.4.320.0090.01911.72
5.4.310.0030.02211.78
5.4.300.0050.01911.77
5.4.290.0060.02411.66
5.4.280.0040.02311.71
5.4.270.0130.02514.83
5.4.260.0100.02514.77
5.4.250.0110.03014.90
5.4.240.0070.02814.78
5.4.230.0060.04014.74
5.4.220.0090.03214.84
5.4.210.0050.03414.80
5.4.200.0100.03514.98
5.4.190.0120.02715.01
5.4.180.0100.03614.86
5.4.170.0070.03614.86
5.4.160.0100.03514.90
5.4.150.0130.02514.98
5.4.140.0070.03413.84
5.4.130.0030.03213.51
5.4.120.0070.03713.65
5.4.110.0030.03413.77
5.4.100.0030.03513.56
5.4.90.0130.02513.63
5.4.80.0030.03313.65
5.4.70.0080.02613.60
5.4.60.0120.02513.75
5.4.50.0070.02513.70
5.4.40.0080.03113.66
5.4.30.0080.03713.76
5.4.20.0080.02713.64
5.4.10.0100.03813.57
5.4.00.0070.03213.46
5.3.290.0040.02711.73
5.3.280.0070.03012.45
5.3.270.0120.02912.63
5.3.260.0100.02312.65
5.3.250.0060.04112.60
5.3.240.0090.02612.40
5.3.230.0050.03412.57
5.3.220.0050.03012.33
5.3.210.0110.03512.38
5.3.200.0100.03512.43
5.3.190.0100.03512.54
5.3.180.0080.03012.44
5.3.170.0050.04112.48
5.3.160.0050.03512.61
5.3.150.0130.03512.41
5.3.140.0090.03512.45
5.3.130.0090.02512.45
5.3.120.0030.03212.49
5.3.110.0060.03812.48
5.3.100.0020.03712.24
5.3.90.0040.04112.28
5.3.80.0050.03512.23
5.3.70.0050.02712.25
5.3.60.0050.03512.10
5.3.50.0120.02412.14
5.3.40.0030.03212.13
5.3.30.0060.03512.17
5.3.20.0050.03012.05
5.3.10.0100.02311.89
5.3.00.0070.03811.89
5.2.170.0030.02510.63
5.2.160.0050.02210.70
5.2.150.0070.02310.57
5.2.140.0050.02510.62
5.2.130.0150.02010.53
5.2.120.0010.02610.62
5.2.110.0120.02510.57
5.2.100.0050.02710.65
5.2.90.0020.02710.66
5.2.80.0050.03010.55
5.2.70.0030.03310.48
5.2.60.0100.02810.53
5.2.50.0020.03510.57
5.2.40.0030.02310.52
5.2.30.0080.02810.55
5.2.20.0070.02510.49
5.2.10.0100.02610.49
5.2.00.0060.03110.43
5.1.60.0090.01510.12
5.1.50.0020.0239.98
5.1.40.0000.03310.01
5.1.30.0040.02910.23
5.1.20.0020.03110.24
5.1.10.0100.02110.15
5.1.00.0030.02810.09
5.0.50.0050.0159.19
5.0.40.0030.0149.25
5.0.30.0050.0269.13
5.0.20.0050.0179.16
5.0.10.0030.0239.14
5.0.00.0030.0299.08
4.4.90.0070.0128.13
4.4.80.0040.0118.12
4.4.70.0030.0138.05
4.4.60.0030.0168.04
4.4.50.0000.0168.03
4.4.40.0020.0237.98
4.4.30.0020.0117.98
4.4.20.0050.0157.98
4.4.10.0060.0138.14
4.4.00.0050.0238.14
4.3.110.0020.0138.14
4.3.100.0030.0178.14
4.3.90.0030.0178.14
4.3.80.0020.0178.14
4.3.70.0050.0128.14
4.3.60.0070.0108.14
4.3.50.0020.0168.14
4.3.40.0030.0238.14
4.3.30.0000.0148.14
4.3.20.0010.0148.14
4.3.10.0050.0098.14
4.3.00.0070.0138.09

preferences:
47.44 ms | 401 KiB | 5 Q