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 // 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.40.0120.00618.89
8.3.30.0090.00519.08
8.3.20.0030.00520.34
8.3.10.0030.00523.66
8.3.00.0050.00319.25
8.2.170.0090.00622.96
8.2.160.0110.00420.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00726.16
8.2.120.0070.00022.31
8.2.110.0060.00322.06
8.2.100.0070.00417.91
8.2.90.0000.00819.09
8.2.80.0070.00418.04
8.2.70.0040.00417.38
8.2.60.0100.00017.91
8.2.50.0040.00818.07
8.2.40.0000.00919.63
8.2.30.0070.00017.86
8.2.20.0050.00317.71
8.2.10.0030.00518.09
8.2.00.0040.00417.79
8.1.270.0050.00323.84
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00423.96
8.1.230.0040.00819.00
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.24
8.1.190.0000.00817.40
8.1.180.0000.00918.10
8.1.170.0000.00818.59
8.1.160.0030.00621.99
8.1.150.0000.00818.64
8.1.140.0070.00017.45
8.1.130.0000.00717.82
8.1.120.0040.00417.55
8.1.110.0040.00417.45
8.1.100.0000.00717.34
8.1.90.0000.00717.48
8.1.80.0040.00417.33
8.1.70.0000.00717.34
8.1.60.0000.00817.45
8.1.50.0000.00817.51
8.1.40.0050.00317.39
8.1.30.0030.00617.51
8.1.20.0040.00417.68
8.1.10.0020.00517.48
8.1.00.0040.00417.47
8.0.300.0000.00719.09
8.0.290.0040.00417.16
8.0.280.0070.00018.37
8.0.270.0030.00317.18
8.0.260.0000.00717.23
8.0.250.0030.00316.81
8.0.240.0050.00316.88
8.0.230.0000.00716.96
8.0.220.0030.00316.77
8.0.210.0070.00016.89
8.0.200.0000.00716.93
8.0.190.0000.00816.91
8.0.180.0110.00016.80
8.0.170.0000.00816.89
8.0.160.0040.00416.76
8.0.150.0040.00416.71
8.0.140.0000.00816.79
8.0.130.0060.00013.33
8.0.120.0050.00316.89
8.0.110.0040.00416.93
8.0.100.0000.00716.90
8.0.90.0050.00216.73
8.0.80.0050.01216.91
8.0.70.0090.00916.92
8.0.60.0070.01016.90
8.0.50.0030.01216.92
8.0.30.0090.01217.00
8.0.20.0100.00817.27
8.0.10.0060.00917.02
8.0.00.0090.00916.84
7.4.330.0020.00215.00
7.4.320.0000.00616.54
7.4.300.0000.00616.58
7.4.290.0000.00816.64
7.4.280.0030.00316.54
7.4.270.0000.00716.50
7.4.260.0000.00616.55
7.4.250.0040.00416.59
7.4.240.0020.00416.60
7.4.230.0040.00416.50
7.4.220.0130.00616.58
7.4.210.0080.00716.59
7.4.200.0090.00616.59
7.4.190.0070.01116.54
7.4.180.0060.01016.51
7.4.160.0100.00916.60
7.4.150.0070.01316.93
7.4.140.0120.00817.41
7.4.130.0100.01116.50
7.4.120.0140.00616.48
7.4.110.0050.01316.45
7.4.100.0080.01016.61
7.4.90.0040.01216.56
7.4.80.0030.01717.95
7.4.70.0110.00516.46
7.4.60.0090.01016.41
7.4.50.0070.00416.47
7.4.40.0080.00819.55
7.4.30.0100.00516.31
7.4.20.0100.00916.33
7.4.10.0090.00716.26
7.4.00.0060.00915.70
7.3.330.0000.00613.32
7.3.320.0000.00513.35
7.3.310.0050.00316.35
7.3.300.0030.00716.31
7.3.290.0060.00916.34
7.3.280.0080.00916.39
7.3.270.0100.00816.87
7.3.260.0090.00816.38
7.3.250.0090.01116.43
7.3.240.0050.01116.32
7.3.230.0120.00416.36
7.3.220.0030.01016.23
7.3.210.0070.00916.33
7.3.200.0080.01017.84
7.3.190.0110.00616.34
7.3.180.0030.01116.33
7.3.170.0080.00716.36
7.3.160.0070.00816.41
7.3.150.0000.01416.26
7.3.140.0130.00016.28
7.3.130.0040.01016.33
7.3.120.0090.00615.54
7.3.110.0120.00315.81
7.3.100.0080.00815.84
7.3.90.0050.01115.93
7.3.80.0070.00815.85
7.3.70.0050.01015.86
7.3.60.0040.01015.89
7.3.50.0080.00515.79
7.3.40.0100.00515.85
7.3.30.0100.00815.79
7.3.20.0070.00816.50
7.3.10.0080.00816.33
7.3.00.0090.00616.42
7.2.340.0160.01116.29
7.2.330.0180.00216.47
7.2.320.0110.01116.46
7.2.310.0190.00716.44
7.2.300.0100.01516.35
7.2.290.0070.01416.36
7.2.280.0110.01616.32
7.2.270.0200.01016.27
7.2.260.0160.00616.49
7.2.250.0140.00815.95
7.2.240.0110.01116.01
7.2.230.0070.01415.87
7.2.220.0080.01215.84
7.2.210.0140.00815.94
7.2.200.0110.00815.94
7.2.190.0100.00815.96
7.2.180.0150.00515.98
7.2.170.0100.00916.02
7.2.160.0130.00916.40
7.2.150.0110.01416.48
7.2.140.0120.01116.56
7.2.130.0210.00316.59
7.2.120.0140.00716.54
7.2.110.0170.00616.60
7.2.100.0100.01216.61
7.2.90.0150.00716.44
7.2.80.0170.00816.49
7.2.70.0180.00616.54
7.2.60.0090.01016.69
7.2.50.0130.00816.52
7.2.40.0160.00816.56
7.2.30.0180.00416.53
7.2.20.0120.00916.53
7.2.10.0150.00816.52
7.2.00.0150.01117.47
7.1.330.0110.00815.59
7.1.320.0130.00815.46
7.1.310.0120.00715.46
7.1.300.0150.00415.53
7.1.290.0080.00915.46
7.1.280.0120.00615.56
7.1.270.0090.01015.57
7.1.260.0200.00715.53
7.1.250.0120.01115.38
7.1.240.0140.01015.49
7.1.230.0160.00915.51
7.1.220.0180.00615.41
7.1.210.0110.01115.33
7.1.200.0110.01015.53
7.1.190.0190.00015.47
7.1.180.0100.00915.45
7.1.170.0100.01015.49
7.1.160.0110.01015.46
7.1.150.0160.00615.43
7.1.140.0150.00615.48
7.1.130.0170.00415.43
7.1.120.0150.01015.46
7.1.110.0140.00915.39
7.1.100.0150.00716.34
7.1.90.0130.01015.42
7.1.80.0170.00915.49
7.1.70.0090.01015.96
7.1.60.0150.00816.87
7.1.50.0160.00815.93
7.1.40.0220.00615.46
7.1.30.0160.00715.49
7.1.20.0160.00615.37
7.1.10.0190.00515.40
7.1.00.0160.02817.76
7.0.330.0120.01015.12
7.0.320.0180.00815.08
7.0.310.0120.01015.14
7.0.300.0140.00915.03
7.0.290.0110.01215.30
7.0.280.0130.00915.04
7.0.270.0170.00615.10
7.0.260.0160.00715.29
7.0.250.0220.01115.22
7.0.240.0160.01015.21
7.0.230.0150.01015.30
7.0.220.0170.00715.32
7.0.210.0120.01115.11
7.0.200.0090.00915.72
7.0.190.0140.00915.28
7.0.180.0160.00515.02
7.0.170.0100.01015.17
7.0.160.0180.00515.30
7.0.150.0140.00915.12
7.0.140.0120.02917.48
7.0.130.0070.01415.16
7.0.120.0130.01015.25
7.0.110.0160.00315.13
7.0.100.0130.00815.19
7.0.90.0090.01215.18
7.0.80.0120.00815.18
7.0.70.0100.03417.26
7.0.60.0140.02917.47
7.0.50.0080.02717.45
7.0.40.0090.03016.79
7.0.30.0100.03316.90
7.0.20.0120.01816.78
7.0.10.0250.02616.82
7.0.00.0090.03416.83
5.6.400.0150.01015.85
5.6.390.0090.01315.59
5.6.380.0130.00915.73
5.6.370.0090.01115.69
5.6.360.0090.01115.72
5.6.350.0150.00615.68
5.6.340.0140.01015.63
5.6.330.0100.01115.69
5.6.320.0130.00915.73
5.6.310.0090.01415.69
5.6.300.0160.00915.86
5.6.290.0140.00615.81
5.6.280.0130.03117.57
5.6.270.0080.01215.69
5.6.260.0100.01015.64
5.6.250.0150.00415.73
5.6.240.0080.01715.53
5.6.230.0150.00815.65
5.6.220.0150.01717.23
5.6.210.0120.03217.32
5.6.200.0080.02317.49
5.6.190.0120.02017.43
5.6.180.0120.03017.52
5.6.170.0140.02717.53
5.6.160.0110.03317.40
5.6.150.0060.03617.54
5.6.140.0100.03417.43
5.6.130.0100.03017.51
5.6.120.0150.02517.53
5.6.110.0100.02017.52
5.6.100.0110.03117.45
5.6.90.0060.03917.45
5.6.80.0100.03317.23
5.6.70.0070.02017.26
5.6.60.0130.03017.36
5.6.50.0110.02317.29
5.6.40.0100.03317.22
5.6.30.0130.02617.33
5.6.20.0070.02217.33
5.6.10.0090.02817.20
5.6.00.0090.02817.29
5.5.380.0140.01115.71
5.5.370.0180.00615.77
5.5.360.0120.01917.34
5.5.350.0060.03517.27
5.5.340.0080.03017.41
5.5.330.0090.03517.26
5.5.320.0130.03317.33
5.5.310.0100.03017.44
5.5.300.0150.02917.32
5.5.290.0100.03517.41
5.5.280.0090.03017.44
5.5.270.0060.03517.41
5.5.260.0120.02917.40
5.5.250.0100.03517.38
5.5.240.0070.03517.22
5.5.230.0130.02817.09
5.5.220.0100.03217.22
5.5.210.0100.03417.16
5.5.200.0090.03317.06
5.5.190.0100.03217.16
5.5.180.0080.02717.12
5.5.170.0180.00615.59
5.5.160.0110.01717.15
5.5.150.0130.02217.00
5.5.140.0110.03017.10
5.5.130.0140.02616.94
5.5.120.0110.02917.08
5.5.110.0150.03017.09
5.5.100.0160.02717.18
5.5.90.0130.02517.24
5.5.80.0080.02617.14
5.5.70.0090.02917.13
5.5.60.0130.03217.11
5.5.50.0170.02617.12
5.5.40.0140.02917.11
5.5.30.0090.02917.13
5.5.20.0140.03017.16
5.5.10.0110.03017.21
5.5.00.0110.03517.08
5.4.450.0120.02914.86
5.4.440.0090.03314.83
5.4.430.0070.03014.83
5.4.420.0110.02914.83
5.4.410.0080.02914.74
5.4.400.0120.02714.75
5.4.390.0060.01914.72
5.4.380.0110.02514.66
5.4.370.0090.03014.59
5.4.360.0070.03314.71
5.4.350.0100.02914.65
5.4.340.0100.01814.64
5.4.330.0130.00412.54
5.4.320.0080.02614.61
5.4.310.0130.02014.82
5.4.300.0180.02514.58
5.4.290.0110.03014.73
5.4.280.0130.02714.68
5.4.270.0080.02914.65
5.4.260.0080.02914.64
5.4.250.0100.02714.76
5.4.240.0080.02414.65
5.4.230.0110.02814.58
5.4.220.0120.02214.54
5.4.210.0110.02914.55
5.4.200.0100.02414.65
5.4.190.0090.02714.60
5.4.180.0070.03114.62
5.4.170.0110.02914.55
5.4.160.0080.03114.65
5.4.150.0070.02214.55
5.4.140.0080.02613.91
5.4.130.0090.02613.76
5.4.120.0090.01713.70
5.4.110.0090.03013.88
5.4.100.0100.02213.76
5.4.90.0060.02613.78
5.4.80.0100.02913.82
5.4.70.0090.02613.89
5.4.60.0070.02813.76
5.4.50.0070.02913.74
5.4.40.0090.02413.83
5.4.30.0110.02413.88
5.4.20.0060.03013.78
5.4.10.0060.03013.91
5.4.00.0080.02613.47
5.3.290.0130.02413.63
5.3.280.0050.03013.50
5.3.270.0120.02413.62
5.3.260.0060.02913.60
5.3.250.0120.01813.53
5.3.240.0080.02613.46
5.3.230.0090.02413.50
5.3.220.0100.02913.38
5.3.210.0120.02513.46
5.3.200.0080.02813.44
5.3.190.0070.03013.48
5.3.180.0070.02313.56
5.3.170.0080.02413.54
5.3.160.0090.02513.49
5.3.150.0110.02713.58
5.3.140.0060.02913.49
5.3.130.0100.02613.46
5.3.120.0090.03113.54
5.3.110.0060.03113.47
5.3.100.0060.02613.21
5.3.90.0080.02413.23
5.3.80.0070.03013.22
5.3.70.0060.02413.28
5.3.60.0070.01913.33
5.3.50.0090.02313.25
5.3.40.0090.02013.23
5.3.30.0060.03213.17
5.3.20.0090.02813.20
5.3.10.0060.02912.98
5.3.00.0070.02813.11

preferences:
50.33 ms | 400 KiB | 5 Q