3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Challenge 3: Use reflection to get access to Question::$answer from $e->getAnswer */ class Question { private $answer = 42; public function __construct($e) { try { throw $e; } catch (Exception $e) { echo $e->getAnswer($this) . PHP_EOL; } } } // start editing here class Answer { public function getAnswer() { } } // end editing here new Question($e);

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.0140.00716.50
8.3.50.0100.01021.95
8.3.40.0110.00418.80
8.3.30.0080.00619.04
8.3.20.0030.01520.21
8.3.10.0040.00423.66
8.3.00.0040.00419.18
8.2.180.0040.01118.41
8.2.170.0150.00022.96
8.2.160.0120.00620.38
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.74
8.2.110.0090.00022.25
8.2.100.0110.00017.78
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0040.00417.92
8.2.50.0080.00018.07
8.2.40.0040.00419.88
8.2.30.0040.00418.26
8.2.20.0000.00717.70
8.2.10.0070.00018.11
8.2.00.0030.00517.78
8.1.280.0100.00325.92
8.1.270.0080.00021.88
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00024.01
8.1.230.0120.00019.16
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0090.00317.35
8.1.190.0070.00317.23
8.1.180.0030.00518.10
8.1.170.0050.00518.49
8.1.160.0050.00221.99
8.1.150.0040.00418.63
8.1.140.0070.00017.41
8.1.130.0000.00717.89
8.1.120.0080.00017.32
8.1.110.0070.00017.32
8.1.100.0030.00417.42
8.1.90.0050.00317.36
8.1.80.0040.00417.49
8.1.70.0030.00317.36
8.1.60.0040.00417.58
8.1.50.0040.00417.42
8.1.40.0040.00417.54
8.1.30.0000.00817.47
8.1.20.0060.00317.55
8.1.10.0000.00817.55
8.1.00.0030.00617.52
8.0.300.0000.00718.77
8.0.290.0040.00417.04
8.0.280.0000.00718.31
8.0.270.0050.00317.11
8.0.260.0080.00317.18
8.0.250.0000.00716.86
8.0.240.0070.00016.93
8.0.230.0080.00016.89
8.0.220.0040.00416.88
8.0.210.0000.00716.84
8.0.200.0000.00716.97
8.0.190.0050.00316.98
8.0.180.0070.00316.80
8.0.170.0040.00416.89
8.0.160.0040.00416.77
8.0.150.0030.00416.88
8.0.140.0040.00716.80
8.0.130.0030.00313.30
8.0.120.0060.00316.95
8.0.110.0050.00216.83
8.0.100.0040.00416.94
8.0.90.0070.00016.95
8.0.80.0060.01616.91
8.0.70.0040.00416.82
8.0.60.0030.00416.95
8.0.50.0040.00416.97
8.0.30.0120.00917.14
8.0.20.0100.00817.40
8.0.10.0070.00017.06
8.0.00.0080.01016.74
7.4.330.0000.00515.16
7.4.320.0030.00316.52
7.4.300.0000.00716.54
7.4.290.0000.00716.62
7.4.280.0060.00316.45
7.4.270.0000.00716.50
7.4.260.0070.00016.55
7.4.250.0000.00716.51
7.4.240.0020.00516.58
7.4.230.0040.00416.69
7.4.220.0060.00916.60
7.4.210.0080.00916.64
7.4.200.0070.00016.61
7.4.190.0000.00716.39
7.4.160.0000.01616.39
7.4.150.0150.00417.40
7.4.140.0110.00617.86
7.4.130.0110.00716.59
7.4.120.0060.01316.44
7.4.110.0150.00316.56
7.4.100.0070.01016.58
7.4.90.0070.01116.44
7.4.80.0040.01519.39
7.4.70.0130.01016.68
7.4.60.0120.00616.39
7.4.50.0040.00416.18
7.4.40.0150.00416.43
7.4.30.0120.00916.49
7.4.00.0080.01114.77
7.3.330.0050.00013.43
7.3.320.0060.00013.22
7.3.310.0030.00316.35
7.3.300.0030.00316.36
7.3.290.0070.01316.36
7.3.280.0060.01316.29
7.3.270.0030.01617.40
7.3.260.0060.01616.58
7.3.250.0080.00816.37
7.3.240.0080.00816.56
7.3.230.0140.00316.58
7.3.210.0130.00316.31
7.3.200.0130.00319.39
7.3.190.0100.00716.37
7.3.180.0090.00616.33
7.3.170.0090.00816.51
7.3.160.0090.00616.51
7.3.120.0100.00514.69
7.3.110.0070.01114.73
7.3.100.0040.01514.92
7.3.90.0070.00714.67
7.3.80.0100.01015.10
7.3.70.0100.00714.86
7.3.60.0040.00814.68
7.3.50.0060.00914.89
7.3.40.0030.01014.64
7.3.30.0090.00314.91
7.3.20.0030.00616.57
7.3.10.0070.00716.42
7.3.00.0070.00716.58
7.2.330.0110.00716.57
7.2.320.0030.01516.65
7.2.310.0090.00816.53
7.2.300.0110.00616.58
7.2.290.0110.01116.70
7.2.250.0100.01014.88
7.2.240.0030.01714.98
7.2.230.0070.01415.09
7.2.220.0080.00414.97
7.2.210.0090.00615.05
7.2.200.0070.01014.83
7.2.190.0060.01014.77
7.2.180.0140.00314.93
7.2.170.0080.00414.96
7.2.130.0070.00416.62
7.2.120.0070.00716.75
7.2.110.0060.01016.73
7.2.100.0030.01016.79
7.2.90.0060.00316.97
7.2.80.0000.00916.61
7.2.70.0030.01416.91
7.2.60.0050.00916.73
7.2.50.0030.00616.89
7.2.40.0040.01116.85
7.2.30.0040.00816.92
7.2.20.0030.00716.60
7.2.10.0000.01416.73
7.2.00.0080.00518.01
7.1.330.0100.00715.76
7.1.320.0000.01415.39
7.1.310.0080.00915.65
7.1.300.0060.00915.87
7.1.290.0090.00315.75
7.1.280.0060.00615.68
7.1.270.0040.01115.94
7.1.260.0000.01415.57
7.1.250.0050.00515.65
7.1.240.0030.00615.72
7.1.230.0040.00815.20
7.1.220.0080.00315.63
7.1.210.0060.00615.70
7.1.200.0080.00115.53
7.1.190.0090.00315.60
7.1.180.0000.01315.68
7.1.170.0070.00715.52
7.1.160.0080.00015.55
7.1.150.0030.00715.74
7.1.140.0070.00715.67
7.1.130.0040.00715.74
7.1.120.0030.00715.59
7.1.110.0050.00515.66
7.1.100.0070.00916.85
7.1.90.0070.00715.75
7.1.80.0070.00715.73
7.1.70.0020.00916.28
7.1.60.0100.00917.51
7.1.50.0070.00916.30
7.1.40.0060.00615.86
7.1.30.0150.00315.74
7.1.20.0030.00615.57
7.1.10.0070.00715.57
7.1.00.0080.03818.95
7.0.330.0070.00014.97
7.0.320.0030.00715.09
7.0.310.0040.00415.16
7.0.300.0100.00315.38
7.0.290.0000.00915.51
7.0.280.0070.00015.17
7.0.270.0030.00715.34
7.0.260.0040.00415.24
7.0.250.0080.00315.39
7.0.240.0040.00415.21
7.0.230.0040.00415.38
7.0.220.0000.00715.36
7.0.210.0090.00314.96
7.0.200.0050.00715.93
7.0.190.0060.00315.14
7.0.180.0000.01315.20
7.0.170.0030.00915.06
7.0.160.0030.01015.39
7.0.150.0120.00615.45
7.0.140.0050.03818.71
7.0.130.0000.00815.33
7.0.120.0030.00515.29
7.0.110.0040.00815.42
7.0.100.0090.00315.15
7.0.90.0070.00715.28
7.0.80.0030.00614.84
7.0.70.0040.00415.47
7.0.60.0140.03117.51
7.0.50.0030.02516.66
7.0.40.0070.04216.76
7.0.30.0170.02716.66
7.0.20.0100.03616.60
7.0.10.0030.04016.64
7.0.00.0070.04216.66
5.6.380.0070.00313.98
5.6.370.0030.00614.18
5.6.360.0080.00614.16
5.6.350.0050.00314.28
5.6.340.0070.00614.34
5.6.330.0060.00914.17
5.6.320.0030.00914.04
5.6.310.0000.00914.45
5.6.300.0030.01014.38
5.6.290.0030.00613.91
5.6.280.0040.04017.66
5.6.270.0090.00614.47
5.6.260.0000.00814.33
5.6.250.0040.00414.33
5.6.240.0030.01013.96
5.6.230.0030.01014.02
5.6.220.0090.00014.03
5.6.210.0110.04017.37
5.6.200.0070.04316.19
5.6.190.0030.02917.35
5.6.180.0200.03717.22
5.6.170.0130.04317.33
5.6.160.0060.03517.23
5.6.150.0040.04316.20
5.6.140.0030.02316.17
5.6.130.0040.02316.29
5.6.120.0020.03017.58
5.6.110.0050.04717.61
5.6.100.0090.04017.35
5.6.90.0040.02717.62
5.6.80.0110.04217.23
5.6.70.0030.00713.89
5.6.60.0090.00314.43
5.6.50.0130.00014.06
5.6.40.0070.00313.98
5.6.30.0110.00613.86
5.6.20.0060.00613.91
5.6.10.0080.00614.10
5.6.00.0000.01013.98
5.5.380.0000.01011.11
5.5.370.0040.00410.90
5.5.360.0040.00411.09
5.5.350.0030.04315.50
5.5.340.0070.02714.70
5.5.330.0070.03015.74
5.5.320.0260.03515.50
5.5.310.0170.02215.67
5.5.300.0040.02714.54
5.5.290.0090.04014.33
5.5.280.0050.04016.06
5.5.270.0020.03215.89
5.5.260.0030.02416.04
5.5.250.0070.03315.79
5.5.240.0040.04215.58
5.5.230.0040.00411.09
5.5.220.0050.00010.91
5.5.210.0060.00311.08
5.5.200.0000.01110.83
5.5.190.0060.00011.19
5.5.180.0000.00811.04
5.5.170.0030.00711.07
5.5.160.0030.00510.93
5.5.150.0040.00410.67
5.5.140.0000.00610.85
5.5.130.0030.00910.91
5.5.120.0000.01010.79
5.5.110.0070.00011.21
5.5.100.0040.00810.91
5.5.90.0080.00010.73
5.5.80.0030.00310.87
5.5.70.0100.00011.04
5.5.60.0030.00610.79
5.5.50.0000.00511.03
5.5.40.0030.00710.59
5.5.30.0050.00510.97
5.5.20.0060.00311.09
5.5.10.0000.00710.91
5.5.00.0070.00410.68
5.4.450.0140.02615.16
5.4.440.0500.03515.22
5.4.430.0370.04015.11
5.4.420.0240.02515.00
5.4.410.0480.04215.32
5.4.400.0350.02614.95
5.4.390.0400.03514.95
5.4.380.0160.03314.75
5.4.370.0190.03114.76
5.4.360.0220.02414.74
5.4.350.0350.03114.60
5.4.340.0110.02514.79
5.4.330.0000.00510.74
5.4.320.0070.01911.70
5.4.310.0070.02711.72
5.4.300.0050.02611.48
5.4.290.0040.02211.68
5.4.280.0060.02211.53
5.4.270.0040.02511.76
5.4.260.0050.02111.62
5.4.250.0050.02011.69
5.4.240.0060.02011.59
5.4.230.0080.01711.57
5.4.220.0010.02211.38
5.4.210.0070.01811.44
5.4.200.0100.01811.35
5.4.190.0060.01911.40
5.4.180.0040.02111.54
5.4.170.0020.02411.58
5.4.160.0070.02011.43
5.4.150.0060.02211.71
5.4.140.0020.02411.47
5.4.130.0020.02411.45
5.4.120.0020.02311.47
5.4.110.0040.02011.46
5.4.100.0060.02011.35
5.4.90.0060.02311.47
5.4.80.0070.02611.43
5.4.70.0080.02411.37
5.4.60.0060.02111.41
5.4.50.0040.02211.28
5.4.40.0060.02111.39
5.4.30.0050.02011.38
5.4.20.0050.02211.22
5.4.10.0060.02111.45
5.4.00.0020.02511.16
5.3.290.0050.02411.72
5.3.280.0050.03311.56
5.3.270.0050.03111.64
5.3.260.0050.03011.57
5.3.250.0070.02011.66
5.3.240.0060.02211.51
5.3.230.0060.01911.61
5.3.220.0040.02411.55
5.3.210.0040.02411.54
5.3.200.0040.02211.41
5.3.190.0040.03011.57
5.3.180.0100.02611.55
5.3.170.0040.03311.59
5.3.160.0050.02111.51
5.3.150.0060.02911.46
5.3.140.0040.03211.59
5.3.130.0040.03211.55
5.3.120.0040.03311.49
5.3.110.0090.03011.55
5.3.100.0060.02811.30
5.3.90.0080.02611.24
5.3.80.0050.02911.17
5.3.70.0110.04111.14
5.3.60.0060.02711.30
5.3.50.0040.02811.28
5.3.40.0050.02211.16
5.3.30.0090.02411.20
5.3.20.0130.03011.03
5.3.10.0100.02310.96
5.3.00.0110.02211.01
5.2.170.0050.0209.32
5.2.160.0040.0239.32
5.2.150.0040.0259.32
5.2.140.0060.0239.38
5.2.130.0050.0229.30
5.2.120.0040.0259.35
5.2.110.0030.0169.30
5.2.100.0040.0189.37
5.2.90.0020.0189.39
5.2.80.0070.0149.40
5.2.70.0040.0189.31
5.2.60.0020.0219.28
5.2.50.0060.0149.26
5.2.40.0060.0159.29
5.2.30.0040.0179.23
5.2.20.0010.0209.23
5.2.10.0060.0159.18
5.2.00.0040.0199.12
5.1.60.0040.0198.76
5.1.50.0050.0178.75
5.1.40.0050.0168.74
5.1.30.0020.0178.92
5.1.20.0060.0148.93
5.1.10.0050.0158.79
5.1.00.0040.0148.79
5.0.50.0070.0098.03
5.0.40.0050.0107.96
5.0.30.0040.0177.87
5.0.20.0020.0127.85
5.0.10.0020.0147.84
5.0.00.0040.0167.84
4.4.90.0020.0107.10
4.4.80.0030.0097.08
4.4.70.0020.0097.08
4.4.60.0030.0097.08
4.4.50.0030.0087.09
4.4.40.0030.0137.06
4.4.30.0040.0077.09
4.4.20.0040.0077.13
4.4.10.0030.0097.13
4.4.00.0030.0137.09
4.3.110.0030.0097.04
4.3.100.0030.0087.04
4.3.90.0020.0097.03
4.3.80.0040.0147.00
4.3.70.0020.0077.02
4.3.60.0010.0107.02
4.3.50.0020.0117.02
4.3.40.0030.0146.97
4.3.30.0010.0116.36
4.3.20.0020.0096.35
4.3.10.0010.0116.33
4.3.00.0050.0108.17

preferences:
39.41 ms | 401 KiB | 5 Q