3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Question { public function __construct(AnswerInterface $answer) { echo "What is 2 + 2?\n"; $answer = $answer->get()->the()->answer(); if ($answer instanceof AnswerInterface) { echo $answer . PHP_EOL; } } } interface AnswerInterface { public function get(); public function the(); public function answer(); } // start editing here // end editing here $answer = new Answer; $question = new Question($answer);

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.0150.00018.56
8.3.50.0130.00421.95
8.3.40.0120.00318.82
8.3.30.0100.00719.17
8.3.20.0080.00020.29
8.3.10.0040.00421.80
8.3.00.0050.00322.42
8.2.180.0150.00616.75
8.2.170.0140.00022.96
8.2.160.0100.00320.80
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0020.00526.16
8.2.120.0080.00019.23
8.2.110.0130.01022.02
8.2.100.0120.00017.87
8.2.90.0040.00418.03
8.2.80.0030.00617.97
8.2.70.0000.00817.50
8.2.60.0030.00717.91
8.2.50.0030.00718.07
8.2.40.0000.00717.97
8.2.30.0000.00917.92
8.2.20.0000.00817.76
8.2.10.0000.00717.66
8.2.00.0040.00417.59
8.1.280.0140.00025.92
8.1.270.0080.00022.14
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0110.01122.54
8.1.230.0100.00020.93
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0060.00317.22
8.1.190.0000.00817.53
8.1.180.0050.00318.10
8.1.170.0050.00318.55
8.1.160.0030.00621.95
8.1.150.0000.00718.57
8.1.140.0020.00517.32
8.1.130.0040.00417.77
8.1.120.0040.00417.38
8.1.110.0030.00717.22
8.1.100.0040.00417.36
8.1.90.0070.00017.32
8.1.80.0040.00417.37
8.1.70.0000.00717.32
8.1.60.0060.00317.36
8.1.50.0040.00417.46
8.1.40.0040.00417.39
8.1.30.0050.00217.50
8.1.20.0000.00817.52
8.1.10.0040.00417.42
8.1.00.0020.00517.35
8.0.300.0000.00719.81
8.0.290.0040.00417.05
8.0.280.0030.00318.25
8.0.270.0070.00017.20
8.0.260.0040.00416.81
8.0.250.0030.00616.98
8.0.240.0050.00316.89
8.0.230.0060.00016.94
8.0.220.0040.00416.91
8.0.210.0000.00716.87
8.0.200.0030.00316.83
8.0.190.0060.00316.97
8.0.180.0000.00716.93
8.0.170.0030.00516.96
8.0.160.0040.00417.00
8.0.150.0040.00416.79
8.0.140.0040.00416.79
8.0.130.0030.00313.28
8.0.120.0000.00816.72
8.0.110.0000.00716.89
8.0.100.0050.00316.91
8.0.90.0040.00416.71
8.0.80.0080.00816.84
8.0.70.0040.00416.72
8.0.60.0000.00716.72
8.0.50.0000.00716.93
8.0.30.0150.00716.92
8.0.20.0150.00717.40
8.0.10.0050.00316.93
8.0.00.0050.01316.79
7.4.330.0050.00015.00
7.4.320.0000.00716.41
7.4.300.0000.00716.44
7.4.290.0030.00316.46
7.4.280.0070.00016.49
7.4.270.0070.00016.45
7.4.260.0070.00016.32
7.4.250.0070.00016.42
7.4.240.0050.00216.44
7.4.230.0000.00716.64
7.4.220.0080.01416.55
7.4.210.0070.00816.57
7.4.200.0040.00416.28
7.4.190.0080.00016.45
7.4.160.0130.00316.33
7.4.150.0190.00617.40
7.4.140.0110.00617.86
7.4.130.0130.00916.48
7.4.120.0150.00116.48
7.4.110.0030.01716.39
7.4.100.0130.00316.31
7.4.90.0130.00916.36
7.4.80.0040.01519.39
7.4.70.0030.01416.38
7.4.60.0100.00716.43
7.4.50.0040.00416.37
7.4.40.0030.01322.77
7.4.30.0130.00316.54
7.4.00.0070.00714.86
7.3.330.0000.00513.30
7.3.320.0030.00313.29
7.3.310.0040.00416.28
7.3.300.0050.00216.30
7.3.290.0100.00316.26
7.3.280.0070.00916.33
7.3.270.0100.00717.40
7.3.260.0070.01016.54
7.3.250.0110.00616.29
7.3.240.0120.00916.30
7.3.230.0130.00316.39
7.3.210.0030.01316.29
7.3.200.0110.00719.39
7.3.190.0130.00716.57
7.3.180.0090.00616.29
7.3.170.0100.00716.53
7.3.160.0070.01016.23
7.3.120.0030.01015.08
7.3.10.0070.00716.62
7.3.00.0030.01016.76
7.2.330.0140.00316.43
7.2.320.0090.01416.50
7.2.310.0090.00916.50
7.2.300.0120.00416.24
7.2.290.0070.01016.46
7.2.130.0080.00816.84
7.2.120.0080.00816.74
7.2.110.0030.00816.66
7.2.100.0060.00616.80
7.2.90.0030.01016.69
7.2.80.0090.00616.86
7.2.70.0040.00816.47
7.2.60.0050.00916.70
7.2.50.0060.00916.81
7.2.40.0040.01416.86
7.2.30.0030.01316.69
7.2.20.0110.00416.84
7.2.10.0070.00316.82
7.2.00.0040.00816.86
7.1.250.0030.01015.69
7.1.200.0040.00815.58
7.1.70.0040.00417.15
7.1.60.0110.01419.82
7.1.50.0030.01316.83
7.1.00.0070.07322.33
7.0.200.0050.00516.66
7.0.140.0070.07021.97
7.0.60.0100.08020.02
7.0.50.0070.04017.97
7.0.40.0070.08720.26
7.0.30.0270.07320.34
7.0.20.0370.07720.23
7.0.10.0030.04020.24
7.0.00.0070.08320.22
5.6.280.0030.06721.13
5.6.210.0170.07020.75
5.6.200.0100.06018.26
5.6.190.0130.08020.34
5.6.180.0370.06020.56
5.6.170.0300.08020.47
5.6.160.0100.08020.71
5.6.150.0070.08018.29
5.6.140.0030.05718.15
5.6.130.0170.07718.18
5.6.120.0070.05321.00
5.6.110.0070.06020.97
5.6.100.0170.07320.99
5.6.90.0070.06021.05
5.6.80.0100.07720.41
5.6.70.3930.03720.44
5.5.350.0000.08720.41
5.5.340.0070.08317.93
5.5.330.0070.08320.29
5.5.320.0000.06320.27
5.5.310.0300.04020.27
5.5.300.0070.07718.07
5.5.290.0000.04318.09
5.5.280.0170.07020.80
5.5.270.0070.05020.79
5.5.260.0100.07720.84
5.5.250.0100.08020.72
5.5.240.0270.06720.16
5.4.450.0730.05719.39
5.4.440.0870.06319.70
5.4.430.0970.05019.20
5.4.420.0130.05019.33
5.4.410.0970.05019.09
5.4.400.0270.05718.54
5.4.390.0130.05318.79
5.4.380.0200.05018.81
5.4.370.0100.04018.78
5.4.360.0130.03318.79
5.4.350.0090.03412.02
5.4.340.0100.03512.02
5.4.320.0030.03912.50
5.4.310.0070.03612.50
5.4.300.0050.03612.51
5.4.290.0050.03812.50
5.4.280.0070.03612.39
5.4.270.0100.07018.97
5.4.260.0200.06319.01
5.4.250.0030.08719.09
5.4.240.0270.05319.08
5.4.230.0200.06318.90
5.4.220.0200.04319.08
5.4.210.0170.07018.99
5.4.200.0100.05719.12
5.4.190.0100.07018.96
5.4.180.0100.07319.06
5.4.170.0130.06718.91
5.4.160.0100.06018.95
5.4.150.0200.04718.81
5.4.140.0030.05316.60
5.4.130.0200.03716.66
5.4.120.0130.07316.66
5.4.110.0200.04316.41
5.4.100.0100.05016.44
5.4.90.0170.04316.54
5.4.80.0130.04316.65
5.4.70.0030.06016.41
5.4.60.0070.05316.64
5.4.50.0170.05316.55
5.4.40.0130.06016.68
5.4.30.0170.06016.38
5.4.20.0130.06316.65
5.4.10.0070.06716.63
5.4.00.0200.05316.05
5.3.290.0060.03812.80
5.3.280.0130.04714.66
5.3.270.0130.05014.88
5.3.260.0100.05314.66
5.3.250.0030.07714.88
5.3.240.0070.05714.66
5.3.230.0100.05014.72
5.3.220.0170.04314.69
5.3.210.0130.05314.63
5.3.200.0100.06014.62
5.3.190.0170.05714.86
5.3.180.0100.05314.84
5.3.170.0100.05014.86
5.3.160.0030.05714.62
5.3.150.0070.05314.69
5.3.140.0070.05314.83
5.3.130.0170.04714.84
5.3.120.0200.06714.74
5.3.110.0170.05714.78
5.3.100.0070.05714.23
5.3.90.0070.05014.08
5.3.80.0230.06014.21
5.3.70.0130.06314.33
5.3.60.0130.04314.29
5.3.50.0130.06714.01
5.3.40.0000.05714.02
5.3.30.0170.04014.20
5.3.20.0100.04714.00
5.3.10.0200.04713.70
5.3.00.0070.06313.93
5.2.170.0100.04311.20
5.2.160.0070.04011.45
5.2.150.0130.04011.03
5.2.140.0130.04011.03
5.2.130.0100.04311.10
5.2.120.0030.04311.41
5.2.110.0130.04011.31
5.2.100.0100.03711.22
5.2.90.0030.04710.98
5.2.80.0070.04011.38
5.2.70.0030.04711.15
5.2.60.0100.03711.35
5.2.50.0000.06311.02
5.2.40.0030.05011.05
5.2.30.0100.03711.19
5.2.20.0030.04311.17
5.2.10.0130.04311.05
5.2.00.0130.05010.92
5.1.60.0070.03010.21
5.1.50.0030.04010.15
5.1.40.0030.03710.28
5.1.30.0130.03010.62
5.1.20.0130.04310.53
5.1.10.0070.03310.22
5.1.00.0000.04010.29
5.0.50.0070.0308.65
5.0.40.0030.0378.57
5.0.30.0070.0508.42
5.0.20.0030.0278.43
5.0.10.0000.0338.05
5.0.00.0100.0408.37
4.4.90.0030.0237.52
4.4.80.0030.0207.52
4.4.70.0030.0277.52
4.4.60.0030.0277.52
4.4.50.0000.0377.52
4.4.40.0070.0337.52
4.4.30.0070.0277.52
4.4.20.0000.0277.52
4.4.10.0000.0237.52
4.4.00.0030.0477.52
4.3.110.0030.0237.52
4.3.100.0070.0307.52
4.3.90.0070.0307.52
4.3.80.0000.0377.52
4.3.70.0000.0277.52
4.3.60.0070.0207.52
4.3.50.0030.0237.52
4.3.40.0100.0307.52
4.3.30.0000.0307.52
4.3.20.0000.0277.52
4.3.10.0070.0207.52
4.3.00.0130.0236.79

preferences:
45.9 ms | 401 KiB | 5 Q